Skip to content

Fix field type checking#29

Merged
roxblnfk merged 6 commits intocycle:1.xfrom
msmakouz:bugfix/optimistic-lock-schema
May 16, 2023
Merged

Fix field type checking#29
roxblnfk merged 6 commits intocycle:1.xfrom
msmakouz:bugfix/optimistic-lock-schema

Conversation

@msmakouz
Copy link
Member

@msmakouz msmakouz commented May 10, 2023

Can't use ->column($this->column) here:
https://github.com/cycle/entity-behavior/blob/1.x/src/OptimisticLock.php#L126

The column has not yet been created, and this method creates it with the specified name, without a type. We can only check the column type using the type in the Cycle\Schema\Definition\Field.

Other changes

  1. Added PHP 8.2 tests
  2. Updated Psalm to v5.11

@msmakouz msmakouz added the type:bug Bug label May 10, 2023
@msmakouz msmakouz requested a review from roxblnfk May 10, 2023 13:24
@msmakouz msmakouz self-assigned this May 10, 2023
@msmakouz msmakouz linked an issue May 10, 2023 that may be closed by this pull request
1 task
@codecov
Copy link

codecov bot commented May 10, 2023

Codecov Report

Merging #29 (5dc5dc7) into 1.x (60cc56f) will decrease coverage by 2.91%.
The diff coverage is 91.30%.

@@             Coverage Diff              @@
##                1.x      #29      +/-   ##
============================================
- Coverage     85.27%   82.36%   -2.91%     
- Complexity      147      151       +4     
============================================
  Files            22       20       -2     
  Lines           387      431      +44     
============================================
+ Hits            330      355      +25     
- Misses           57       76      +19     
Impacted Files Coverage Δ
src/Schema/RegistryModifier.php 76.13% <87.50%> (-12.44%) ⬇️
src/OptimisticLock.php 85.96% <100.00%> (-0.04%) ⬇️

... and 10 files with indirect coverage changes

@roxblnfk roxblnfk changed the title Field type checking fix Fix Field type checking May 16, 2023
@roxblnfk roxblnfk changed the title Fix Field type checking Fix field type checking May 16, 2023
@roxblnfk roxblnfk merged commit d148455 into cycle:1.x May 16, 2023
@roxblnfk roxblnfk added the type:feature New feature. label May 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:bug Bug type:feature New feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐛 OptimisticLock schema generation

2 participants