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

Check if index.php file exists before ignoring it #14532

Merged
merged 1 commit into from Jul 9, 2019

Conversation

@jolelievre
Copy link
Contributor

commented Jul 8, 2019

Questions Answers
Branch? 1.7.6.x
Description? When creating annotation driver we need to check if the file exists or the annotation scanning will fail
Type? bug fix
Category? BO
BC breaks? no
Deprecations? no
Fixed ticket? ~
How to test? Test the ./bin/console doctrine:mapping:info with the productcomments module installed (which contains an index.php file) AND the doctrine example module from https://github.com/friends-of-presta/doctrine (which does not contain an index.php file). The entities from both modules need to be scanned correctly.

This change is Reviewable

@jolelievre jolelievre requested a review from PrestaShop/prestashop-core-developers as a code owner Jul 8, 2019

@eternoendless eternoendless added this to the 1.7.6.0 milestone Jul 8, 2019

@sarahdib sarahdib added QA ✔️ and removed waiting for QA labels Jul 9, 2019

@matks

This comment has been minimized.

Copy link
Contributor

commented Jul 9, 2019

Restarting Travis...

@matks

This comment has been minimized.

Copy link
Contributor

commented Jul 9, 2019

Thank you @jolelievre

@matks matks merged commit bfddb61 into PrestaShop:1.7.6.x Jul 9, 2019

2 checks passed

PrettyCI Code formatting
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
$driverDefinition->addMethodCall('addExcludePaths', [[$moduleEntityDirectory . '/index.php']]);
$indexFile = $moduleEntityDirectory . '/index.php';
if (file_exists($indexFile)) {
$driverDefinition->addMethodCall('addExcludePaths', [[$moduleEntityDirectory . '/index.php']]);

This comment has been minimized.

Copy link
@MathiasReker

MathiasReker Jul 9, 2019

Contributor

Why not use $indexFile instead of $moduleEntityDirectory . '/index.php'?

This comment has been minimized.

Copy link
@jolelievre

jolelievre Jul 9, 2019

Author Contributor

You're right, that's what I intended to do!! ^^
Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants
You can’t perform that action at this time.