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

Dev into master #198

Open
wants to merge 68 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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 Mar 7, 2022
283779d
Updated words to be accurate for Dec 2022.
Danack Dec 9, 2022
57a4275
Updated to modern version of PHPUnit and add phpunit switcher for CI.
Danack Dec 8, 2022
93920b0
Dynamic property creation is no longer a thing.
Danack Dec 8, 2022
0460307
Change config to avoid warnings on coverage only tests.
Danack Dec 8, 2022
c254996
Relax access for properties so that they can be read by tests.
Danack Dec 8, 2022
c911e18
Ignore files that should never be added.
Danack Dec 8, 2022
15d947b
Migrated PHPUnit config file to modern format.
Danack Dec 8, 2022
1e59a90
Fix majority of tests. Remaining ones are more difficult.
Danack Dec 8, 2022
2ad6fc3
Fix two mocking errors.
Danack Dec 8, 2022
e57ba16
Skip tests that need proper investigation.
Danack Dec 8, 2022
c6709a7
Fix test testDelegationDoesntMakeObject
Danack Dec 8, 2022
d01a31a
Continue running in CI on failures for now.
Danack Dec 8, 2022
23274ea
Try removing actual phpunit to see if it makes tests run.
Danack Dec 8, 2022
f6d498e
Remove old annotations as they are giving deprecation warnings.
Danack Dec 8, 2022
321aae3
Double-check having phpunit breaks CI.
Danack Dec 8, 2022
b2fbae6
Update badge to my repo for now.
Danack Dec 8, 2022
067bc79
Make name easier to understand.
Danack Dec 8, 2022
0f3b07f
Investigate when behaviour changed.
Danack Dec 8, 2022
aff99a5
Remove phpunit again, it is causing a problem as a direct dependency.
Danack Dec 8, 2022
8b46ab0
Adjust tests expectation based on which version of PHP they are being…
Danack Dec 8, 2022
ae2dee4
Correct typos.
Danack Dec 8, 2022
b7771b8
Fix spelling to work on PHP 7.x - might still be broken on 8+
Danack Dec 8, 2022
d037f7d
Hack fix for InjectorTest::testNonConcreteDependencyWithDefaultValueT…
Danack Dec 8, 2022
7ecc162
Unskip other tests that are now working.
Danack Dec 9, 2022
874b26b
Drop support for PHP < 7.3
Danack Dec 9, 2022
113f8c7
fix rdlowrey/auryn#129
Aug 7, 2018
1f8809a
Add PHP 8.2 to testing.
Danack Dec 9, 2022
76070d0
Change test rather than changing code...technically a BC break, but p…
Danack Dec 9, 2022
95067d2
Run CI against PHP 7.2
Danack Dec 10, 2022
5ed3ece
Remove leading slashes and question marks in one go.
Danack Dec 10, 2022
9f3bd4b
Remove duplicate line. That has been there for seven years.
Danack Dec 10, 2022
4707dad
Switch back to simple-phpunit as although PHPUnit 8.5.31 works on PHP…
Danack Dec 10, 2022
fac542d
Fewer words = more better.
Danack Dec 10, 2022
d730160
Added link to lazy instantiation version of Auryn, and words on why i…
Danack Dec 20, 2022
7d500bc
Added words to explain why https://github.com/rdlowrey/auryn/issues/3…
Danack Dec 21, 2022
150f057
Wrote some words on why variadics aren't supported.
Danack Dec 26, 2022
d52795d
Correct badge URL.
Danack Dec 26, 2022
0f44000
Changed 'typehint' to 'type'.
Danack Jan 11, 2023
6c06f16
Added more words to document why features were excluded.
Danack Jan 11, 2023
6e92e26
Completed sentence in docs.
Danack Jan 11, 2023
f93349d
Added words for static initialisation.
Danack Jan 22, 2023
bcaa1d3
More words.
Danack Jan 22, 2023
af851c1
Update php-cs-fixer and fix CS issues.
Danack Jan 23, 2023
d8bcb0a
Remove 5.3 compatibility code.
Danack Jan 21, 2023
de20dcf
Throwable has been the base exception since PHP 7.0, so the second ca…
Danack Jan 21, 2023
d5d05dd
Upgrading github actions/checkout
Danack Apr 17, 2023
a9a6146
Use more appropriate exception for during config process.
Danack Dec 8, 2022
dfde7c8
CS
Danack Apr 17, 2023
f46c70c
Switch to phpbench as Atheltic was abandoned.
Danack Jan 21, 2023
e29bbec
Add coverage tests for Executable.
Danack Jan 22, 2023
e00a69b
Added tests and improved error messages, and wrote documentation for …
Danack Jan 22, 2023
65a1517
Added note on static method of how it could be private.
Danack Apr 17, 2023
83592b6
Added phpbench config file.
Danack Apr 17, 2023
cef6506
Ignore lines for code coverage, so that testing can be at 100% locally.
Danack Apr 17, 2023
829fd95
Document behaviour of prepare replacement.
Danack Jan 21, 2023
12e8f2c
Move check for whether an object was created by a delegate method to …
Danack Jan 21, 2023
2d03a9e
Prevent double sharing of same type.
Danack Apr 17, 2023
f2f81c2
Add test coverage for new in initializer.
Danack Apr 20, 2023
f7cb772
Added test coverage and note on why optional dependencies are not cre…
Danack Apr 20, 2023
46b7998
Fix property name.
Danack Apr 20, 2023
322c91d
Fix trailing comma.
Danack Apr 20, 2023
ae0e21e
Minimum version is PHP 7.2 which is > 5.6 so check is not needed.
Danack Apr 20, 2023
e3e9d00
Adding non-trivial benchmark.
Danack Apr 21, 2023
64f32c4
WIP words...
Danack Apr 17, 2023
5a3e751
Reasonable draft of words.
Danack Apr 21, 2023
4cd4b4e
Typos.
Danack Apr 22, 2023
b739eb9
Move benchmarks to their own job, and only run on two versions of PHP.
Danack May 23, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
82 changes: 82 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
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"
Copy link
Collaborator

Choose a reason for hiding this comment

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

What does this do?

Copy link
Contributor

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


- run: composer install
Copy link
Collaborator

Choose a reason for hiding this comment

The 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



benchmark:
name: "Benchmark on PHP ${{ matrix.php-version }}"

runs-on: 'ubuntu-latest'

continue-on-error: true

strategy:
matrix:
php-version:
- '7.4'
- '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

- run: composer install

- name: Execute benchmarks
run: vendor/bin/phpbench run
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
vendor/
composer.lock
.idea
/.phpunit.result.cache
/composer.phar
25 changes: 12 additions & 13 deletions .php_cs
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);