Skip to content

Commit

Permalink
Update directory structure
Browse files Browse the repository at this point in the history
Per zendframework/zend-expressive#176 (comment),
this patch does the following:

- Creates a `src/App/` subdirectory, and moves `src/Action/` and `src/Composer`
  beneath them.
- Creates a `test/AppTest/` subdirectory, and moves `test/Action/` beneath it.
- Updates the `autoload` and `autoload-dev` entries for `App` and `AppTest`,
  respectively, to reference the new paths.
- Updates the `App\Composer\OptionalPackages` class to reference
  `src/App/Action` instead of `src/Action/` when specifying the directory to
  remove during a minimal installation. It also ensures that the default tests
  are removed during minimal installation (which wasn't handled previously, and
  spotted when making the directory changes).
  • Loading branch information
weierophinney committed Dec 9, 2015
1 parent fb017cf commit 966bd51
Show file tree
Hide file tree
Showing 34 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
},
"autoload": {
"psr-4": {
"App\\": "src/"
"App\\": "src/App/"
}
},
"autoload-dev": {
"psr-4": {
"AppTest\\": "test/"
"AppTest\\": "test/AppTest/"
}
},
"scripts": {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
* Add this script to composer.json:
*
* "scripts": {
* "pre-update-cmd": "Zend\\Expressive\\Composer\\OptionalPackages::install",
* "pre-install-cmd": "Zend\\Expressive\\Composer\\OptionalPackages::install"
* "pre-update-cmd": "App\\Composer\\OptionalPackages::install",
* "pre-install-cmd": "App\\Composer\\OptionalPackages::install"
* },
*/
class OptionalPackages
Expand Down Expand Up @@ -389,7 +389,10 @@ private static function requestMinimal(IOInterface $io)
private static function removeDefaultMiddleware(IOInterface $io, $projectRoot)
{
$io->write("<info>Removing default middleware classes and factories</info>");
self::recursiveRmdir($projectRoot . '/src/Action');
self::recursiveRmdir($projectRoot . '/src/App/Action');

$io->write("<info>Removing default middleware class tests</info>");
self::recursiveRmdir($projectRoot . '/test/AppTest/Action');

$io->write("<info>Removing assets</info>");
unlink($projectRoot . '/public/favicon.ico');
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 966bd51

Please sign in to comment.