Skip to content

Revision for 0.2 #16

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

Merged
merged 39 commits into from
Apr 10, 2020
Merged
Show file tree
Hide file tree
Changes from 29 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
80c673a
Discontinue support for PHP 5.x
XedinUnknown Nov 5, 2019
8963a33
Added basic Docker setup for PHP 7.0
XedinUnknown Nov 5, 2019
852b450
Removed NetBeans configs
XedinUnknown Nov 5, 2019
6fc1c2b
Added PHPStorm configs
XedinUnknown Nov 5, 2019
45334fc
Updated dependencies
XedinUnknown Nov 5, 2019
28d42b4
Ignoring .env file
XedinUnknown Nov 5, 2019
131f0c2
Removed unused classes
mecha Nov 6, 2019
43b5d99
Updated dependencies
mecha Nov 6, 2019
b921f9f
Set branch alias to 0.2.x
mecha Nov 6, 2019
506b7ca
Rewrote module interface using the 0.2 spec
mecha Nov 6, 2019
b698c0b
Updated IDE project files
mecha Nov 6, 2019
725d71b
Updated the interface description in the readme
mecha Nov 6, 2019
a51ea79
Updated changelog for 0.2.x changes
mecha Nov 6, 2019
2dc8da5
Simplified link in readme
XedinUnknown Nov 6, 2019
edd591c
Changed official requirement to PHP 7.0 in Composer
XedinUnknown Nov 6, 2019
8d58f19
Upgraded PHPUnit to version 6
XedinUnknown Nov 6, 2019
b0610e1
No longer depending on XPMock
XedinUnknown Nov 6, 2019
9e74c77
No longer depending on Dhii exceptions or stringable
XedinUnknown Nov 6, 2019
bcb6285
Fixed tests
XedinUnknown Nov 6, 2019
019b483
Merge branch 'develop' into 0.2.x
XedinUnknown Nov 6, 2019
718f246
Merge branch 'develop' into 0.2.x
XedinUnknown Nov 6, 2019
2b47fb3
Switched to PHP 7.0 compatible coding standard
XedinUnknown Nov 6, 2019
8a73334
Added return type hint to `setup()` method
mecha Nov 6, 2019
10e0d4a
Merge branch '0.2.x' of github.com:Dhii/module-interface into 0.2.x
mecha Nov 6, 2019
47d6543
Build on PHP 7.4 and disallow failure on it
XedinUnknown Mar 13, 2020
6998916
Update deps
XedinUnknown Mar 13, 2020
fcd6113
Remove unused deps and scripts
XedinUnknown Mar 13, 2020
5d7be66
Correct typo in version constraint
XedinUnknown Mar 15, 2020
d12074f
Requiring PSR container and SP packages
mecha Mar 15, 2020
e7fe9b5
Fix obsolete PHPUnit type
XedinUnknown Mar 15, 2020
e2b45e7
Merge remote-tracking branch 'origin/0.2.x' into 0.2.x
XedinUnknown Mar 15, 2020
8124a32
Switch to PHP 7.1
XedinUnknown Mar 15, 2020
02d0b92
Add Composer PHPStorm config
XedinUnknown Mar 15, 2020
77e2287
Add workspace config to separate changelist
XedinUnknown Mar 16, 2020
7ddcec2
Update Readme
XedinUnknown Mar 16, 2020
7ac40f6
Further improve readme
XedinUnknown Mar 16, 2020
9b6571c
Type improvements
XedinUnknown Mar 17, 2020
2236f95
Now testing if exception is throwable
XedinUnknown Mar 17, 2020
1abbf93
Merge remote-tracking branch 'origin/0.2.x' into 0.2.x
XedinUnknown Mar 17, 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
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
BASE_PATH=./
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@
/.idea/vagrant.xml
/.idea/misc.xml
/.idea/inspectionProfiles/
/.env
38 changes: 36 additions & 2 deletions .idea/module-interface.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/php-test-framework.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

165 changes: 135 additions & 30 deletions .idea/php.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions .idea/remote-mappings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 1 addition & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
language: php
dist: precise
php:
- '5.3'
- '5.4'
- '5.5'
- '5.6'
- '7.0'
- '7.1'
- '7.2'
- '7.3'
- '7.4'
- nightly

matrix:
Expand All @@ -17,7 +13,6 @@ matrix:
fast_finish: true

before_script:
- phpenv config-add travis.php.ini
- composer update --prefer-dist
script:
- vendor/bin/phpunit
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [[*next-version*]] - YYYY-MM-DD
### Changed
- Module `setup()` now returns a `ServiceProviderInterface` instance.
- Module `run()` now requires the `ContainerInterface` argument.
- Modules are no longer key-aware.

### Removed
- `DependenciesAwareInterface` has been removed.
- `ModuleFactoryInterface` has been removed.
- `ModuleKeyAwareInterface` has been removed.

## [0.1] - 2019-11-05
Stable release
Expand Down
19 changes: 7 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,16 @@
This package contains interfaces that are useful in describing modules and their attributes and behaviour.

### Interfaces
- [`ModuleInterface`][ModuleInterface] - Represents a module. A module MUST have a key, and MUST be able to be set up
and run separately in order to have the chance to prepare itself and let other potential modules to do the same. The
`setup()` method MAY return a container with the services provided by that module. The `run()` method MAY accept an
optional container with the services provided by the application, but MUST handle the case where no container is provided.
The container provided to `run()` MAY be the same container returned from `setup()`. Implementations that consume
their own services SHOULD therefore rely only on what is provided to `run()`, which gives the application the means
to add or override services. Nevertheless, implementations MUST NOT assume that the container received by `run()` is
the same container returned from `setup()`.
- [`ModuleInterface`][] - The interface for a module. A module is an object that represents an
application fragment. Modules are prepared using `setup()`, which returns a `ServiceProviderInterface` instance that
the application may consume, and invoked using `run()`.

### Requirements
This package officially supports PHP 5.3 until PHP 7.3. Theoretically, it should work on higher versions of PHP just
the same, at the very least until PHP 8. However, it does not appear possible to build on PHP 5.3 and 7.4 at the same
time, because there seems to be no distro which has both of those in its toolchain.
- PHP: <= 7.0 | < 7.4

Officially supports at least up to php 7.3.x. Should be compatible with PHP 7.x.


[Dhii]: https://github.com/Dhii/dhii

[ModuleInterface]: src/ModuleInterface.php
[`ModuleInterface`]: src/ModuleInterface.php
Loading