minor enhancements to php symfony 6 generator (#12455)

This commit is contained in:
William Cheng 2022-05-25 16:12:22 +08:00 committed by GitHub
parent 16365ac989
commit 621f87b5e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 2 additions and 61 deletions

View File

@ -1001,6 +1001,7 @@ Here is a list of template creators:
* PHP Slim: @jfastnacht
* PHP Slim4: [@ybelenko](https://github.com/ybelenko)
* PHP Symfony: @ksm2
* PHP Symfony6: @BenjaminHae
* Python FastAPI: @krjakbrjak
* Python AIOHTTP:
* Ruby on Rails 5: @zlx

View File

@ -356,7 +356,6 @@ public class PhpSymfonyServerCodegen extends AbstractPhpCodegen implements Codeg
// Testing components
supportingFiles.add(new SupportingFile("testing/phpunit.xml.mustache", "", "phpunit.xml.dist"));
supportingFiles.add(new SupportingFile("testing/pom.xml", "", "pom.xml"));
supportingFiles.add(new SupportingFile("testing/AppKernel.mustache", toSrcPath(testsPackage, srcBasePath), "AppKernel.php"));
supportingFiles.add(new SupportingFile("testing/ControllerTest.mustache", toSrcPath(controllerTestsPackage, srcBasePath), "ControllerTest.php"));
supportingFiles.add(new SupportingFile("testing/test_config.yml", toSrcPath(testsPackage, srcBasePath), "test_config.yml"));
@ -442,8 +441,7 @@ public class PhpSymfonyServerCodegen extends AbstractPhpCodegen implements Codeg
} else {
if (defaultIncludes.contains(op.returnType)) {
op.vendorExtensions.put("x-return-type", "array|" + op.returnType);
}
else {
} else {
op.vendorExtensions.put("x-return-type", "array|\\" + op.returnType);
}
}

View File

@ -1,57 +0,0 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>com.penneo</groupId>
<artifactId>PhpSymfonyPetstoreServerTests</artifactId>
<packaging>pom</packaging>
<version>1.0-SNAPSHOT</version>
<name>PHP Symfony Petstore Server</name>
<build>
<plugins>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<id>bundle-install</id>
<phase>pre-integration-test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>composer</executable>
<arguments>
<argument>install</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>bundle-test</id>
<phase>integration-test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>vendor/bin/phpunit</executable>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -45,4 +45,3 @@ autoload.php
composer.json
git_push.sh
phpunit.xml.dist
pom.xml