-
Notifications
You must be signed in to change notification settings - Fork 65
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
Dev into master #198
Open
Danack
wants to merge
68
commits into
master
Choose a base branch
from
dev
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Dev into master #198
Changes from 67 commits
Commits
Show all changes
68 commits
Select commit
Hold shift + click to select a range
d1bd25a
Add notice pointing at new repos.
martin-hughes 283779d
Updated words to be accurate for Dec 2022.
Danack 57a4275
Updated to modern version of PHPUnit and add phpunit switcher for CI.
Danack 93920b0
Dynamic property creation is no longer a thing.
Danack 0460307
Change config to avoid warnings on coverage only tests.
Danack c254996
Relax access for properties so that they can be read by tests.
Danack c911e18
Ignore files that should never be added.
Danack 15d947b
Migrated PHPUnit config file to modern format.
Danack 1e59a90
Fix majority of tests. Remaining ones are more difficult.
Danack 2ad6fc3
Fix two mocking errors.
Danack e57ba16
Skip tests that need proper investigation.
Danack c6709a7
Fix test testDelegationDoesntMakeObject
Danack d01a31a
Continue running in CI on failures for now.
Danack 23274ea
Try removing actual phpunit to see if it makes tests run.
Danack f6d498e
Remove old annotations as they are giving deprecation warnings.
Danack 321aae3
Double-check having phpunit breaks CI.
Danack b2fbae6
Update badge to my repo for now.
Danack 067bc79
Make name easier to understand.
Danack 0f3b07f
Investigate when behaviour changed.
Danack aff99a5
Remove phpunit again, it is causing a problem as a direct dependency.
Danack 8b46ab0
Adjust tests expectation based on which version of PHP they are being…
Danack ae2dee4
Correct typos.
Danack b7771b8
Fix spelling to work on PHP 7.x - might still be broken on 8+
Danack d037f7d
Hack fix for InjectorTest::testNonConcreteDependencyWithDefaultValueT…
Danack 7ecc162
Unskip other tests that are now working.
Danack 874b26b
Drop support for PHP < 7.3
Danack 113f8c7
fix rdlowrey/auryn#129
1f8809a
Add PHP 8.2 to testing.
Danack 76070d0
Change test rather than changing code...technically a BC break, but p…
Danack 95067d2
Run CI against PHP 7.2
Danack 5ed3ece
Remove leading slashes and question marks in one go.
Danack 9f3bd4b
Remove duplicate line. That has been there for seven years.
Danack 4707dad
Switch back to simple-phpunit as although PHPUnit 8.5.31 works on PHP…
Danack fac542d
Fewer words = more better.
Danack d730160
Added link to lazy instantiation version of Auryn, and words on why i…
Danack 7d500bc
Added words to explain why https://github.com/rdlowrey/auryn/issues/3…
Danack 150f057
Wrote some words on why variadics aren't supported.
Danack d52795d
Correct badge URL.
Danack 0f44000
Changed 'typehint' to 'type'.
Danack 6c06f16
Added more words to document why features were excluded.
Danack 6e92e26
Completed sentence in docs.
Danack f93349d
Added words for static initialisation.
Danack bcaa1d3
More words.
Danack af851c1
Update php-cs-fixer and fix CS issues.
Danack d8bcb0a
Remove 5.3 compatibility code.
Danack de20dcf
Throwable has been the base exception since PHP 7.0, so the second ca…
Danack d5d05dd
Upgrading github actions/checkout
Danack a9a6146
Use more appropriate exception for during config process.
Danack dfde7c8
CS
Danack f46c70c
Switch to phpbench as Atheltic was abandoned.
Danack e29bbec
Add coverage tests for Executable.
Danack e00a69b
Added tests and improved error messages, and wrote documentation for …
Danack 65a1517
Added note on static method of how it could be private.
Danack 83592b6
Added phpbench config file.
Danack cef6506
Ignore lines for code coverage, so that testing can be at 100% locally.
Danack 829fd95
Document behaviour of prepare replacement.
Danack 12e8f2c
Move check for whether an object was created by a delegate method to …
Danack 2d03a9e
Prevent double sharing of same type.
Danack f2f81c2
Add test coverage for new in initializer.
Danack f7cb772
Added test coverage and note on why optional dependencies are not cre…
Danack 46b7998
Fix property name.
Danack 322c91d
Fix trailing comma.
Danack ae0e21e
Minimum version is PHP 7.2 which is > 5.6 so check is not needed.
Danack e3e9d00
Adding non-trivial benchmark.
Danack 64f32c4
WIP words...
Danack 5a3e751
Reasonable draft of words.
Danack 4cd4b4e
Typos.
Danack b739eb9
Move benchmarks to their own job, and only run on two versions of PHP.
Danack 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: "CI" | ||
|
||
on: | ||
pull_request: | ||
push: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
tests: | ||
name: "Test on PHP ${{ matrix.php-version }}" | ||
|
||
runs-on: 'ubuntu-latest' | ||
|
||
continue-on-error: true | ||
|
||
strategy: | ||
matrix: | ||
php-version: | ||
- '7.2' | ||
- '7.3' | ||
- '7.4' | ||
- '8.0' | ||
- '8.1' | ||
- '8.2' | ||
|
||
steps: | ||
- name: "Checkout code" | ||
uses: actions/checkout@v3 | ||
|
||
- name: "Install PHP with extensions" | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
coverage: "none" | ||
php-version: ${{ matrix.php-version }} | ||
ini-values: memory_limit=-1 | ||
|
||
- name: "Add PHPUnit matcher" | ||
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | ||
|
||
- run: composer install | ||
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. There should probably be a name here, too? |
||
|
||
- name: "Install PHPUnit" | ||
run: vendor/bin/simple-phpunit install | ||
|
||
- name: "PHPUnit version" | ||
run: vendor/bin/simple-phpunit --version | ||
|
||
- name: "Run tests" | ||
run: vendor/bin/simple-phpunit | ||
|
||
- name: Execute benchmarks | ||
run: vendor/bin/phpbench run |
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,3 +1,5 @@ | ||
vendor/ | ||
composer.lock | ||
.idea | ||
/.phpunit.result.cache | ||
/composer.phar |
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,15 +1,14 @@ | ||
<?php | ||
|
||
return Symfony\CS\Config\Config::create() | ||
->level(Symfony\CS\FixerInterface::NONE_LEVEL) | ||
->fixers([ | ||
"-psr0", | ||
"psr2", | ||
"psr4", | ||
]) | ||
->finder( | ||
Symfony\CS\Finder\DefaultFinder::create() | ||
->in(__DIR__ . "/lib") | ||
->in(__DIR__ . "/test") | ||
) | ||
; | ||
|
||
$finder = PhpCsFixer\Finder::create() | ||
->in(__DIR__ . "/lib") | ||
->in(__DIR__ . "/test"); | ||
|
||
$config = new PhpCsFixer\Config(); | ||
|
||
return $config | ||
->setRules([ | ||
'@PSR2' => true, | ||
]) | ||
->setFinder($finder); |
Oops, something went wrong.
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.
What does this do?
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.
Guessing here, but since we execute
simple-phpunit
instead of running phpunit directly, GH actions doesn't know how to map errors back to code to show properly in the action results. This fixes that by referring to the gh-action built-in mapping configuration for phpunit. https://fusectore.dev/2021/11/19/github-action-problem-matchers.html