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

Refactor #1

Merged
merged 53 commits into from
Jul 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
3e188b5
[BC BREAK] remove static ModelFactory methods:
kbond Jun 13, 2020
0b91249
[BC BREAK] rename Factory methods:
kbond Jun 13, 2020
7b5d2b5
[BC BREAK] refactor instantiator:
kbond Jun 15, 2020
a27a1b4
[bug] refactor ModelFactory::initialize()
kbond Jun 15, 2020
e592da5
[feature] add RepositoryProxy::random() and randomSet($min, ?$max)
kbond Jun 16, 2020
9170214
[feature] add ModelFactory::random() and randomSet($min, ?$max)
kbond Jun 16, 2020
63f9c99
[feature] add support for OneToMany/ManyToOne/ManyToMany relationships
kbond Jun 16, 2020
f1a79ba
[minor] cs fixes
kbond Jun 17, 2020
24fa5d4
[BC BREAK] remove Proxy::$autoRefreshByDefault
kbond Jun 17, 2020
8201a5d
[BC BREAK] remove option to disable wrapping repository in Repository…
kbond Jun 17, 2020
3ae9b0c
[BC BREAK] remove Factory::$proxyByDefault
kbond Jun 17, 2020
49d94b3
[BC BREAK] remove $proxy flag from PersistenceManager::persist()
kbond Jun 17, 2020
71d1d49
[BC BREAK] remove ability to disable proxying
kbond Jun 17, 2020
14f5bcb
[minor] adjust return type hints
kbond Jun 17, 2020
24ea355
[minor] add missing @test annotations
kbond Jun 17, 2020
241ce9b
[minor] remove PersistenceManager::proxy()
kbond Jun 17, 2020
1226f05
[feature] add unpersisted Proxy state
kbond Jun 17, 2020
18036d6
[minor] add Factory::withoutPersisting()
kbond Jun 18, 2020
8f80ac1
[BC BREAK] remove Factory::instantiate() and instantiateMany() - alte…
kbond Jun 18, 2020
020d84c
[minor] refactor Proxy constructor
kbond Jun 18, 2020
29115d8
[feature] allow either the object or proxy to be passed to afterPersi…
kbond Jun 19, 2020
c30982f
[minor] remove need for second test Kernel
kbond Jun 19, 2020
80922f0
[minor] remove tmp cache dir before running tests
kbond Jun 19, 2020
1a8f4c8
[wip] move static state into a Manager that is used to "boot" the fac…
kbond Jun 19, 2020
945df0d
[wip] refactor stories to allow stories as services
kbond Jun 19, 2020
94ae895
[wip] refactor to require bundle:
kbond Jun 19, 2020
9bd2742
[feature] autoconfigure Story services:
kbond Jun 19, 2020
bc84794
[feature] add ability to use foundry without the bundle
kbond Jun 19, 2020
9dde476
[bug] remove injecting Manager into Proxy:
kbond Jun 19, 2020
be65422
[minor] rename Test/Configuration to Test/TestState:
kbond Jun 22, 2020
9b036c3
[BC BREAK] merge GlobalState into TestState
kbond Jun 22, 2020
523e025
[minor] rename Manager to Configuration
kbond Jun 22, 2020
30ee6a9
[minor] refactor TestState to allow customizing boot (w/o container)
kbond Jun 22, 2020
f7a53fb
[minor] remove unnecessary test resets
kbond Jun 22, 2020
c85ec3e
[feature] add bundle config
kbond Jun 22, 2020
01e4069
[bug] don't compile container
kbond Jun 22, 2020
651190f
[minor] adjust typehint
kbond Jun 22, 2020
90b1709
[minor] add todos
kbond Jun 22, 2020
ee4c18e
[bug] Story::build() must be public
kbond Jun 23, 2020
833434a
[bug] switch from self:: to static:: where applicable
kbond Jun 23, 2020
84919b8
[minor] rename Factory::instantiate() to instantiateWith()
kbond Jun 23, 2020
3007559
[minor] refactor Proxy auto-refresh methods
kbond Jun 23, 2020
3b7d753
[minor] split RepositoryProxy::randomSet() into randomSet/randomRange
kbond Jun 23, 2020
9fb946c
[minor] default makers to generate in src/
kbond Jun 23, 2020
de504d7
[minor] have make:story/factory generate in Story dir instead of Stories
kbond Jun 23, 2020
f52111a
[minor] add note about --test flag to MakeFactory/MakeStory
kbond Jun 23, 2020
6890d12
[minor] allow PHP 7.3
kbond Jun 25, 2020
b99482d
[minor] allow PHP 7.2
kbond Jun 25, 2020
e76b82f
[doc] adjust "Global State" to "Global Test State"
kbond Jul 2, 2020
1cb4b31
[doc] add "Using without the Bundle" section
kbond Jul 2, 2020
874381e
[doc] add "Stories as Services" section
kbond Jul 2, 2020
1b69f3e
[doc] add "Seeding your Development Database" section
kbond Jul 2, 2020
6a7f48a
[minor] misc cleanup
kbond Jul 2, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 29 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
strategy:
fail-fast: true
matrix:
php: [7.4]
php: [7.2, 7.3, 7.4]
stability: [prefer-lowest, prefer-stable]
steps:
- name: Checkout code
Expand All @@ -45,11 +45,21 @@ jobs:
- name: Install dependencies
run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-suggest

- name: Run tests
- name: Run tests WITHOUT ZenstruckFoundryBundle
run: vendor/bin/phpunit -v

- name: Run tests with DAMADoctrineTestBundle
- name: Run tests WITH ZenstruckFoundryBundle
run: vendor/bin/phpunit -v
env:
USE_FOUNDRY_BUNDLE: 1

- name: Run tests WITH DAMADoctrineTestBundle and WITHOUT ZenstruckFoundryBundle
run: vendor/bin/phpunit -v --configuration phpunit-dama-doctrine.xml.dist

- name: Run tests WITH DAMADoctrineTestBundle and WITH ZenstruckFoundryBundle
run: vendor/bin/phpunit -v --configuration phpunit-dama-doctrine.xml.dist
env:
USE_FOUNDRY_BUNDLE: 1

code-coverage:
name: Code Coverage
Expand Down Expand Up @@ -84,17 +94,29 @@ jobs:
- name: Install dependencies
run: composer update --prefer-dist --no-interaction --no-suggest

- name: Run code coverage
- name: Run code coverage WITHOUT ZenstruckFoundryBundle
run: vendor/bin/phpunit -v --coverage-text --coverage-clover=coverage.clover

- name: Run code coverage with DAMADoctrineTestBundle
run: vendor/bin/phpunit -v --coverage-text --coverage-clover=dama-coverage.clover
- name: Run code coverage WITH ZenstruckFoundryBundle
run: vendor/bin/phpunit -v --coverage-text --coverage-clover=bundle-coverage.clover
env:
USE_FOUNDRY_BUNDLE: 1

- name: Run code coverage WITH DAMADoctrineTestBundle and WITHOUT ZenstruckFoundryBundle
run: vendor/bin/phpunit -v --coverage-text --coverage-clover=coverage-dama.clover

- name: Run code coverage WITH DAMADoctrineTestBundle and WITH ZenstruckFoundryBundle
run: vendor/bin/phpunit -v --coverage-text --coverage-clover=bundle-coverage-dama.clover
env:
USE_FOUNDRY_BUNDLE: 1

- name: Send code coverage
run: |
wget https://scrutinizer-ci.com/ocular.phar
php ocular.phar code-coverage:upload --format=php-clover coverage.clover
php ocular.phar code-coverage:upload --format=php-clover dama-coverage.clover
php ocular.phar code-coverage:upload --format=php-clover bundle-coverage.clover
php ocular.phar code-coverage:upload --format=php-clover coverage-dama.clover
php ocular.phar code-coverage:upload --format=php-clover bundle-coverage-dama.clover

composer-validate:
name: Validate composer.json
Expand Down
1 change: 1 addition & 0 deletions .php_cs.dist
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ return PhpCsFixer\Config::create()
'remove_inheritdoc' => true,
],
'function_declaration' => ['closure_function_spacing' => 'none'],
'nullable_type_declaration_for_default_null_value' => true,
))
->setRiskyAllowed(true)
->setFinder($finder)
Expand Down
2 changes: 1 addition & 1 deletion .scrutinizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ checks:
tools:
external_code_coverage:
timeout: 900
runs: 2
runs: 4
build:
nodes:
analysis:
Expand Down
Loading