https://github.com/wsdltophp/phpgenerator
Yet another but simple easy to use PHP source code generator
https://github.com/wsdltophp/phpgenerator
generator php-library php-source
Last synced: 9 months ago
JSON representation
Yet another but simple easy to use PHP source code generator
- Host: GitHub
- URL: https://github.com/wsdltophp/phpgenerator
- Owner: WsdlToPhp
- License: mit
- Created: 2015-06-03T21:45:29.000Z (almost 11 years ago)
- Default Branch: develop
- Last Pushed: 2025-05-02T04:42:44.000Z (11 months ago)
- Last Synced: 2025-06-25T15:05:10.431Z (9 months ago)
- Topics: generator, php-library, php-source
- Language: PHP
- Homepage:
- Size: 243 KB
- Stars: 6
- Watchers: 3
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# PhpGenerator, a Real PHP source code generator
> PhpGenerator helps to generate PHP source code
[](https://packagist.org/packages/wsdltophp/phpgenerator)
[](https://packagist.org/packages/wsdltophp/phpgenerator)
[](https://github.com/WsdlToPhp/PhpGenerator)
[](https://scrutinizer-ci.com/g/WsdlToPhp/PhpGenerator/)
[](https://scrutinizer-ci.com/g/WsdlToPhp/PhpGenerator/)
[](https://packagist.org/packages/wsdltophp/phpgenerator)
[](https://styleci.io/repos/36832375)
[](https://insight.symfony.com/projects/a384481c-01ba-4c20-a8c6-a4d852ee7985)
Even if this project is yet another PHP source code generator, its main goal is to provide a consistent PHP source code generator for the [PackageGenerator](https://github.com/WsdlToPhp/PackageGenerator) project. Nevertheless, it also aims to be used for any PHP source code generation process as it generates standard PHP code.
Rest assured that it is not tweaked for the purpose of the [PackageGenerator](https://github.com/WsdlToPhp/PackageGenerator) project.
## Main features
This project contains two main features:
- [Element](src/Element/README.md): generate basic elements
- [Component](src/Component/README.md): generate structured complex elements
## Testing using [Docker](https://www.docker.com/)
Thanks to the [Docker image](https://hub.docker.com/r/splitbrain/phpfarm) of [phpfarm](https://github.com/fpoirotte/phpfarm), tests can be run locally under *any* PHP version using the cli:
- php-7.4
First of all, you need to create your container which you can do using [docker-compose](https://docs.docker.com/compose/) by running the below command line from the root directory of the project:
```bash
$ docker-compose up -d --build
```
You then have a container named `php_generator` in which you can run `composer` commands and `php cli` commands such as:
```bash
# install deps in container (using update ensure it does use the composer.lock file if there is any)
$ docker exec -it php_generator php-7.4 /usr/bin/composer update
# run tests in container
$ docker exec -it php_generator php-7.4 -dmemory_limit=-1 vendor/bin/phpunit
```
## FAQ
If you have a question, feel free to [create an issue](https://github.com/WsdlToPhp/PhpGenerator/issues/new).
## License
The MIT License (MIT). Please see [License File](LICENSE) for more information.