Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix PHPStan #1938

Merged
merged 2 commits into from
Jan 4, 2023
Merged

Fix PHPStan #1938

merged 2 commits into from
Jan 4, 2023

Conversation

dereuromark
Copy link
Contributor

PHPStan latest version seems to make master red

This fixes the issues for <=8.1

For 8.2 we first need to add the version into CI matrix and then fix the following:

 ------ -------------------------------------------------------------------------------------------------------------------------- 
  Line   Propel/Generator/Behavior/Archivable/ArchivableBehavior.php                                                               
 ------ -------------------------------------------------------------------------------------------------------------------------- 
  69     Call to function property_exists() with Propel\Generator\Model\Table and 'isArchiveTable' will always evaluate to false.  
 ------ -------------------------------------------------------------------------------------------------------------------------- 

 ------ -------------------------------------------------------------------------------------------------------------------------------------------------------- 
  Line   Propel/Generator/Behavior/ConcreteInheritance/ConcreteInheritanceBehavior.php                                                                           
 ------ -------------------------------------------------------------------------------------------------------------------------------------------------------- 
  90     Ignored error pattern #^Access to an undefined property Propel\\Generator\\Model\\ForeignKey\:\:\$isParentChild\.$# in path                             
         /work/git/Propel2/src/Propel/Generator/Behavior/ConcreteInheritance/ConcreteInheritanceBehavior.php is expected to occur 1 time, but occurred 2 times.  
  389    Access to an undefined property Propel\Generator\Model\ForeignKey::$isParentChild.                                                                      
 ------ -------------------------------------------------------------------------------------------------------------------------------------------------------- 

 ------ -------------------------------------------------------------------------------------------------------------------------- 
  Line   Propel/Generator/Behavior/Versionable/VersionableBehavior.php                                                             
 ------ -------------------------------------------------------------------------------------------------------------------------- 
  70     Call to function property_exists() with Propel\Generator\Model\Table and 'isVersionTable' will always evaluate to false.  
 ------ -------------------------------------------------------------------------------------------------------------------------- 

                                                                                                                        
 [ERROR] Found 4 errors                                                                                                                                                                                                                      

@codecov-commenter
Copy link

codecov-commenter commented Jan 4, 2023

Codecov Report

Base: 88.29% // Head: 88.29% // Decreases project coverage by -0.00% ⚠️

Coverage data is based on head (23232e0) compared to base (e220b28).
Patch coverage: 80.00% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1938      +/-   ##
============================================
- Coverage     88.29%   88.29%   -0.01%     
- Complexity     7951     7952       +1     
============================================
  Files           242      242              
  Lines         24209    24211       +2     
============================================
+ Hits          21375    21376       +1     
- Misses         2834     2835       +1     
Flag Coverage Δ
5-max 88.29% <80.00%> (-0.01%) ⬇️
7.4 88.29% <80.00%> (-0.01%) ⬇️
agnostic 67.60% <60.00%> (-0.01%) ⬇️
mysql 68.99% <80.00%> (-0.01%) ⬇️
pgsql 68.99% <80.00%> (-0.01%) ⬇️
sqlite 66.95% <80.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/Propel/Common/Config/Loader/FileLoader.php 97.89% <ø> (ø)
src/Propel/Runtime/Util/PropelDateTime.php 95.45% <66.66%> (-2.17%) ⬇️
src/Propel/Runtime/Util/UuidConverter.php 77.77% <100.00%> (ø)
.../Runtime/Validator/Constraints/UniqueValidator.php 92.85% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@dereuromark dereuromark merged commit dc23a61 into master Jan 4, 2023
@dereuromark dereuromark deleted the fixes branch January 4, 2023 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants