-
Notifications
You must be signed in to change notification settings - Fork 407
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
Added ability to load classes with _ in them #566
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -751,8 +751,14 @@ public function testContainerDicePdoWrapperTestBadParams() { | |
$engine->route('/container', Container::class.'->testThePdoWrapper'); | ||
$engine->request()->url = '/container'; | ||
|
||
$this->expectException(ErrorException::class); | ||
$this->expectExceptionMessageMatches("/Passing null to parameter/"); | ||
// php 7.4 will throw a PDO exception, but php 8 will throw an ErrorException | ||
if(version_compare(PHP_VERSION, '8.0.0', '<')) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is highly unusual, but the behavior in PDO actually changed inbetween 7.4 and 8.0 to throw different error messages. |
||
$this->expectException(PDOException::class); | ||
$this->expectExceptionMessageMatches("/invalid data source name/"); | ||
} else { | ||
$this->expectException(ErrorException::class); | ||
$this->expectExceptionMessageMatches("/Passing null to parameter/"); | ||
} | ||
|
||
$engine->start(); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,26 @@ | ||
#!/bin/bash | ||
|
||
# Run all tests | ||
composer lint | ||
composer beautify | ||
composer phpcs | ||
composer test-coverage | ||
xdg-open http://localhost:8000 | ||
composer test-server | ||
php_versions=("php7.4" "php8.0" "php8.1" "php8.2" "php8.3") | ||
|
||
count=${#php_versions[@]} | ||
|
||
|
||
echo "Prettifying code first" | ||
vendor/bin/phpcbf --standard=phpcs.xml | ||
|
||
set -e | ||
for ((i = 0; i < count; i++)); do | ||
if type "${php_versions[$i]}" &> /dev/null; then | ||
echo "Running tests for ${php_versions[$i]}" | ||
echo " ${php_versions[$i]} vendor/bin/phpunit" | ||
${php_versions[$i]} vendor/bin/phpunit | ||
|
||
echo "Running PHPStan" | ||
echo " ${php_versions[$i]} vendor/bin/phpstan" | ||
${php_versions[$i]} vendor/bin/phpstan | ||
|
||
echo "Running PHPCS" | ||
echo " ${php_versions[$i]} vendor/bin/phpcs --standard=phpcs.xml -n" | ||
${php_versions[$i]} vendor/bin/phpcs --standard=phpcs.xml -n | ||
fi | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
class Pascal_Snake_Case // phpcs:ignore | ||
{ | ||
public function doILoad() // phpcs:ignore | ||
{ | ||
echo 'Yes, I load!!!'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This actually caused php8.1+ to fail because it thought the ReturnTypeWillChange class was an attribute class....so it failed.