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

feat(php): Generate project #4612

Merged
merged 4 commits into from
Sep 11, 2024
Merged

feat(php): Generate project #4612

merged 4 commits into from
Sep 11, 2024

Conversation

amckinney
Copy link
Member

Overview

This sets up the PhpProject (which depends on the new AbstractProject also used by the CsharpProject). With this, we now have a lot of the core infra setup to:

  1. Generate source files
  2. Define as-is files copied directly into the project
  3. Generate all the base project files (i.e. composer.json, phpunit.xml, phpstan.neon, etc).
  4. Build, test, and lint all files in seed and in CI (via the generated .github/workflows/ci.yml).

Misc. notes

  1. A simple Placeholder.php file is generated for now so that we demonstrate the full directory tree.
  2. The TypeScript generator context was updated to include a version so that it could be consolidated on the AbstractGeneratorContext.
  3. The namespace configuration option was added to both the model and SDK generators since this will be inevitably be required by a variety of users.

@amckinney amckinney requested a review from dsinghvi as a code owner September 11, 2024 18:38
scripts:
- docker: composer:2.7.9
commands:
- composer install && composer build && composer analyze && composer test
Copy link
Member Author

Choose a reason for hiding this comment

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

Note that we're running all of the scripts defined in the generated composer.json file, so we'll know whenever anything is wrong with the generated code.

We do this in a single line to reduce the number of containers spun up.

Copy link
Contributor

@dcb6 dcb6 left a comment

Choose a reason for hiding this comment

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

🚀

@amckinney amckinney merged commit 63d33bb into main Sep 11, 2024
40 checks passed
@amckinney amckinney deleted the amckinney/php/project branch September 11, 2024 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants