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

messages: PHP implementation #1884

Merged
merged 40 commits into from Jan 31, 2022
Merged

Conversation

ciaranmcnulty
Copy link
Contributor

@ciaranmcnulty ciaranmcnulty commented Jan 21, 2022

This is a PHP implementation of Cucumber Messages (with thanks to @aurelien-reeves)

Todo before merge

  • README
  • Extract Makefile into default.mk templates
  • hook up with CI build
  • Add PHP to docker image

To make usable as a package

  • Create separate sub repo
  • Cucumber user (Cukebot?) register with Packagist.org and set up GitHub hooks

@quine-bot
Copy link

quine-bot bot commented Jan 21, 2022

👋 Figuring out if a PR is useful is hard, hopefully this will help.

  • @ciaranmcnulty has been on GitHub since 2010 and in that time has had 279 public PRs merged
  • Don't you recognize them? They've been here before 🎉
  • Here's a good example of their work: behat-stepthroughextension (Helps you debug Behat scenarios by stopping execution in between steps)
  • From looking at their profile, they seem to be good with PHP and Shell.

Their most recently public accepted PR is: vimeo/psalm#6954

@ciaranmcnulty ciaranmcnulty force-pushed the messages-php branch 6 times, most recently from c39280c to cc87eee Compare January 23, 2022 20:47
@aurelien-reeves
Copy link
Contributor

Nice! Looks great! 🤩

@ciaranmcnulty ciaranmcnulty force-pushed the messages-php branch 2 times, most recently from 6be9fc1 to dc0cb6f Compare January 27, 2022 15:08
@aurelien-reeves
Copy link
Contributor

@ciaranmcnulty I've worked on adding php templates to the monorepo and messages/php to the CI.
I let you take a look on the makefiles if they looks fine

Regarding the CI, we may have to install php as part of the build image actually, as the codegen is written in ruby, we need both php and ruby installed

@ciaranmcnulty
Copy link
Contributor Author

@aurelien-reeves thanks for doing this!

Yes I see the issue. I could re-implement the file splitter in bash perhaps, to remove the need for PHP in the build script (the CS fixer could be removed)

@aurelien-reeves
Copy link
Contributor

@aurelien-reeves thanks for doing this!

Yes I see the issue. I could re-implement the file splitter in bash perhaps, to remove the need for PHP in the build script (the CS fixer could be removed)

We still need php to run the phpunit tests so I'll add it to the build image 🙂

For cs fixer and all the tools of that kind, it's up to you. At the moment you are the owner of the php implementation 😁

@ciaranmcnulty
Copy link
Contributor Author

What's the split on other implementations between build + test? I would imagine we can use phpunit in the PHP image (and in future will want to with different PHP versions), but the code generation can happen in the main build image?

@aurelien-reeves
Copy link
Contributor

At the moment, the code generation actually happens on the developer computer and is pushed in the repo.
And yes, it is also built as part of the CI but only because of the target dependencies in the makefile.

Thus in the CI, the build and the tests are part of the same jobs too. Thus when it is needed, we use the cucumber-buid docker image which contains all development language we support.

This is not perfect, and this is done differently in polyglot repos. There is more decoupling between build and tests when it is needed. But as part of the monorepo, there is a single make command to prepare, build and test a package.

Does that answer your question? 😅

@aurelien-reeves
Copy link
Contributor

I have a commit ready to be pushed once the new build image is ready :D

Due to an issue while releasing cucumber-build 0.12, it has actually
been tagged 0.11.0
@ciaranmcnulty ciaranmcnulty marked this pull request as ready for review January 29, 2022 08:38
@aurelien-reeves aurelien-reeves enabled auto-merge (squash) January 31, 2022 10:11
@aurelien-reeves aurelien-reeves merged commit bcda0c1 into cucumber:main Jan 31, 2022
@aslakhellesoy
Copy link
Contributor

Hi @ciaranmcnulty,

Thanks for your making your first contribution to Cucumber, and welcome to the Cucumber committers team! You can now push directly to this repo and all other repos under the cucumber organization! 🍾

In return for this generous offer we hope you will:

  • ✅ Continue to use branches and pull requests. When someone on the core team approves a pull request (yours or someone else's), you're welcome to merge it yourself.
  • 💚 Commit to setting a good example by following and upholding our code of conduct in your interactions with other collaborators and users.
  • 💬 Join the community Slack channel to meet the rest of the team and make yourself at home.
  • ℹ️ Don't feel obliged to help, just do what you can if you have the time and the energy.
  • 🙋 Ask if you need anything. We're looking for feedback about how to make the project more welcoming, so please tell us!

On behalf of the Cucumber core team,
Aslak Hellesøy
Creator of Cucumber

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.

None yet

3 participants