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

Feature/init command #22

Merged
merged 72 commits into from Sep 15, 2020
Merged

Feature/init command #22

merged 72 commits into from Sep 15, 2020

Conversation

ABGEO
Copy link
Collaborator

@ABGEO ABGEO commented May 12, 2020

Resolves #3

I implemented the initialization command and profile structure. I decided to use a separate directory for each profile. So each Slim init profile must:

  • be defined in its own directory (the directory name will also be the profile name);
  • implement the Slim\Console\Command\Initializer\Profiles\InitProfileInterface or extend Slim\Console\Command\Initializer\Profiles\AbstractInitProfile;
  • define own implementation of run method;

This structure allows us to easily define new profiles and use them. We can also publish profiles on Packagist and require them using composer.

I implemented Blank profile with following features:

  • Create directory and file structure;
  • Setup Project name, Description and license in composer.json
  • Setup PSR-7 implementation;
  • Setup Dependency Container;
  • Setup PSR-3 Logger;

After the review I will write tests.

@ABGEO ABGEO requested review from l0gicgate and adriansuter and removed request for l0gicgate May 12, 2020 18:12
@ABGEO ABGEO self-assigned this May 12, 2020
@ABGEO ABGEO added this to the 0.1 milestone May 12, 2020
@ABGEO ABGEO requested a review from l0gicgate May 12, 2020 18:14
@l0gicgate
Copy link
Member

@ABGEO I won’t be able to review until the weekend. I have other engagements at the moment.

@ABGEO ABGEO requested a review from l0gicgate June 20, 2020 18:42
src/Command/Initializer/Dependency/LaminasDependency.php Outdated Show resolved Hide resolved
src/Command/Initializer/InitCommand.php Outdated Show resolved Hide resolved
src/Command/Initializer/InitCommand.php Outdated Show resolved Hide resolved
src/Command/Initializer/InitCommand.php Outdated Show resolved Hide resolved
src/Command/Initializer/InitCommand.php Show resolved Hide resolved
src/Command/Initializer/InitCommand.php Show resolved Hide resolved
src/Command/Initializer/InitCommand.php Outdated Show resolved Hide resolved
src/Command/Initializer/Profiles/AbstractInitProfile.php Outdated Show resolved Hide resolved
src/Command/Initializer/Profiles/blank/Init.php Outdated Show resolved Hide resolved
@ABGEO ABGEO requested a review from l0gicgate July 19, 2020 12:05
@ABGEO ABGEO marked this pull request as draft August 3, 2020 08:54
@ABGEO ABGEO marked this pull request as ready for review August 3, 2020 08:54
@l0gicgate
Copy link
Member

@ABGEO The init command doesn't seem to work for me. It asks me for composer information: package name, description, license. But then it doesn't ask me for the dependencies I want to install.

The command I run is:

bin/slim init -d new-project

@ABGEO
Copy link
Collaborator Author

ABGEO commented Aug 14, 2020

bin/slim init -d new-project

@l0gicgate the -d (Default) flag prevents us from choosing dependencies. It installs default packages. You can run this command without -d and it will ask you to set up dependencies: bin/slim init new-project.
Also, please see the help message: bin/slim init --help

@ABGEO ABGEO marked this pull request as draft September 8, 2020 07:08
@ABGEO ABGEO marked this pull request as ready for review September 8, 2020 07:08
Copy link
Member

@l0gicgate l0gicgate left a comment

Choose a reason for hiding this comment

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

Alright @ABGEO just a few last things then I'm merging:

The following messages can we reformat them:

Do you want to configure the PSR-7 HTTP message interface?
"Would you like to choose a PSR-7 implentation?"

Do you want to configure Dependency Container? (yes/no)
"Would you like to configure a dependency injection container?"

Do you want to use PSR-3 Logger? (yes/no)
"Would you like to configure a logger?" -> Since there's only one option, yes defaults to installing MonoLog.

As for choices can we start the lists at 1 instead of 0:
list

@ABGEO
Copy link
Collaborator Author

ABGEO commented Sep 14, 2020

@l0gicgate

The following messages can we reformat them:

Done.

As for choices can we start the lists at 1 instead of 0:

No, this is not possible in the Symfony console.

@l0gicgate l0gicgate merged commit 15752fc into slimphp:0.x Sep 15, 2020
@l0gicgate
Copy link
Member

Great work @ABGEO! Thank you for this contribution. Sorry for taking so long to merge this.

@ABGEO
Copy link
Collaborator Author

ABGEO commented Sep 15, 2020

Thanks @l0gicgate! It's a great pleasure to work with you. I'll try to help with other things too :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Init / Setup Command
3 participants