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

Fixes phpstan errors, set PHPStan to level 7 #1951

Merged
merged 10 commits into from
Jan 25, 2023

Conversation

michbeck
Copy link
Contributor

PHP Stan fixes for #1921

composer.json Outdated Show resolved Hide resolved
@dereuromark dereuromark changed the title Fixes phpstan errors Fixes phpstan errors, set PHPStan to level 7 Jan 24, 2023
src/Propel/Generator/Platform/SqlitePlatform.php Outdated Show resolved Hide resolved
src/Propel/Generator/Reverse/MssqlSchemaParser.php Outdated Show resolved Hide resolved
src/Propel/Generator/Reverse/OracleSchemaParser.php Outdated Show resolved Hide resolved
src/Propel/Generator/Util/QuickBuilder.php Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Jan 25, 2023

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 72.91667% with 39 lines in your changes missing coverage. Please review.

Project coverage is 88.56%. Comparing base (5531e13) to head (fc349a2).
Report is 68 commits behind head on master.

Files with missing lines Patch % Lines
src/Propel/Generator/Reverse/PgsqlSchemaParser.php 0.00% 7 Missing ⚠️
src/Propel/Generator/Manager/MigrationManager.php 75.00% 6 Missing ⚠️
src/Propel/Generator/Platform/SqlitePlatform.php 20.00% 4 Missing ⚠️
src/Propel/Generator/Reverse/MysqlSchemaParser.php 69.23% 4 Missing ⚠️
src/Propel/Generator/Model/Domain.php 40.00% 3 Missing ⚠️
src/Propel/Runtime/Adapter/Pdo/PgsqlAdapter.php 25.00% 3 Missing ⚠️
.../Propel/Generator/Builder/Om/AbstractOMBuilder.php 50.00% 2 Missing ⚠️
src/Propel/Generator/Command/InitCommand.php 50.00% 2 Missing ⚠️
src/Propel/Generator/Manager/AbstractManager.php 60.00% 2 Missing ⚠️
src/Propel/Generator/Manager/SqlManager.php 50.00% 1 Missing ⚠️
... and 5 more

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1951      +/-   ##
============================================
- Coverage     88.63%   88.56%   -0.08%     
- Complexity     8019     8051      +32     
============================================
  Files           243      243              
  Lines         24549    24592      +43     
============================================
+ Hits          21759    21779      +20     
- Misses         2790     2813      +23     
Flag Coverage Δ
5-max 88.56% <72.91%> (-0.08%) ⬇️
7.4 88.56% <72.91%> (-0.08%) ⬇️
agnostic 67.30% <43.75%> (-0.10%) ⬇️
mysql 69.08% <53.47%> (-0.06%) ⬇️
pgsql 69.10% <47.91%> (-0.08%) ⬇️
sqlite 67.07% <47.22%> (-0.08%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dereuromark
Copy link
Contributor

@mringler This would then be the last PR merged for the release of new beta this week
Is this OK for you?

@dereuromark dereuromark added this to the 2.0.0 Beta milestone Jan 25, 2023
@dereuromark
Copy link
Contributor

Nice work!

Copy link
Contributor

@mringler mringler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice! Seems like you are literally kicking the crap out of Propel.

src/Propel/Generator/Builder/Om/AbstractOMBuilder.php Outdated Show resolved Hide resolved
@@ -976,7 +976,7 @@ protected static function getRefRelatedBySuffix(ForeignKey $fk): string
$localColumnName = $localColumn->getPhpName();
$localTable = $fk->getTable();
if (!$localColumnName) {
throw new RuntimeException(sprintf('Could not fetch column: %s in table %s.', $localColumnName, $localTable->getName()));
throw new RuntimeException(sprintf('Could not fetch column of table %s.', $localTable->getName()));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above, should the if move up?

src/Propel/Generator/Builder/Util/SchemaReader.php Outdated Show resolved Hide resolved
src/Propel/Generator/Builder/Util/SchemaReader.php Outdated Show resolved Hide resolved
src/Propel/Generator/Manager/MigrationManager.php Outdated Show resolved Hide resolved
src/Propel/Generator/Model/NameFactory.php Outdated Show resolved Hide resolved
src/Propel/Runtime/ActiveQuery/Criteria.php Outdated Show resolved Hide resolved
@mringler
Copy link
Contributor

@mringler This would then be the last PR merged for the release of new beta this week Is this OK for you?

Awesome!

@dereuromark
Copy link
Contributor

Also, only 981 errors more to go for level 8 then :P

@michbeck
Copy link
Contributor Author

Also, only 981 errors more to go for level 8 then :P

Is this a note to be a volunteer? :P

@dereuromark dereuromark merged commit a5caaae into propelorm:master Jan 25, 2023
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.

5 participants