PHP Classes

File: README.md

Recommend this page to a friend!
  Classes of WsdlToPhp   PHP Code Generator   README.md   Download  
File: README.md
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: PHP Code Generator
Generate PHP code elements programatically
Author: By
Last change: Update PHP CS Fixer and corresponding setting file
Add PHPStan
Date: 1 year ago
Size: 3,010 bytes
 

Contents

Class file image Download

PhpGenerator, a Real PHP source code generator

> PhpGenerator helps to generate PHP source code

License Latest Stable Version TeamCity build status Scrutinizer Code Quality Code Coverage Total Downloads StyleCI SymfonyInsight

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 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 project.

Main features

This project contains two main features:

  • Element: generate basic elements
  • Component: generate structured complex elements

Testing using Docker

Thanks to the Docker image of 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 by running the below command line from the root directory of the project:

$ 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:

# 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.

License

The MIT License (MIT). Please see License File for more information.