Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: swaggest/php-code-builder
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.2.15
Choose a base ref
...
head repository: swaggest/php-code-builder
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Sep 16, 2019

  1. Upgrade petstore test

    vearutop committed Sep 16, 2019
    Copy the full SHA
    91f8bd0 View commit details
  2. Copy the full SHA
    52367fc View commit details
  3. Copy the full SHA
    63a710a View commit details

Commits on Sep 21, 2019

  1. Copy the full SHA
    32fa90d View commit details

Commits on Sep 22, 2019

  1. Fix description trimming bug

    vearutop committed Sep 22, 2019
    Copy the full SHA
    6ab0517 View commit details

Commits on Oct 2, 2019

  1. Copy the full SHA
    079af6c View commit details
  2. Introduce changelog

    vearutop committed Oct 2, 2019
    Copy the full SHA
    36d2ba8 View commit details
  3. Copy the full SHA
    3cedeb1 View commit details
  4. Update tests

    vearutop committed Oct 2, 2019
    Copy the full SHA
    c33ade3 View commit details
  5. Update changelog

    vearutop committed Oct 2, 2019
    Copy the full SHA
    989bc3a View commit details

Commits on Oct 24, 2019

  1. Nullable properties (#26)

    cussrox authored and vearutop committed Oct 24, 2019
    Copy the full SHA
    da76d16 View commit details

Commits on Dec 2, 2019

  1. Copy the full SHA
    9aac923 View commit details
  2. Merge pull request #27 from reflexxion/master

    Pattern property setter will always throw an exception on valid prope…
    vearutop authored Dec 2, 2019
    Copy the full SHA
    13ce5c6 View commit details
  3. Rebuild test entities

    vearutop committed Dec 2, 2019
    Copy the full SHA
    d26832b View commit details

Commits on Dec 11, 2019

  1. Copy the full SHA
    069079b View commit details
  2. Merge pull request #28 from derjumpy/master

    Add support to use traits in PhpClass
    vearutop authored Dec 11, 2019
    Copy the full SHA
    2bed50c View commit details
  3. Update CHANGELOG.md

    vearutop authored Dec 11, 2019
    Copy the full SHA
    f230f50 View commit details
  4. Update CHANGELOG.md

    vearutop authored Dec 11, 2019
    Copy the full SHA
    4535bc2 View commit details

Commits on Jan 7, 2020

  1. Copy the full SHA
    0feaba7 View commit details
  2. Exclude objects from default class property values (#30)

    * Exclude objects from default class property values to avoid potential wrong type mapping
    
    * Update PhpCode::varExport to render consistent code across PHP versions
    vearutop authored Jan 7, 2020
    Copy the full SHA
    3f0447e View commit details
  3. Update CHANGELOG.md

    vearutop authored Jan 7, 2020
    Copy the full SHA
    bb613c9 View commit details

Commits on Jan 10, 2020

  1. Copy the full SHA
    4560478 View commit details
  2. Update CHANGELOG.md

    vearutop authored Jan 10, 2020
    Copy the full SHA
    2f562e4 View commit details

Commits on Jun 15, 2020

  1. Copy the full SHA
    9c8ecb6 View commit details
  2. Fix changelog and composer

    vearutop committed Jun 15, 2020
    Copy the full SHA
    c6b644a View commit details

Commits on Jun 16, 2020

  1. Update README.md

    vearutop authored Jun 16, 2020
    Copy the full SHA
    8e657b1 View commit details

Commits on Aug 31, 2020

  1. feat: avoid duplicated symbol declarations (#33)

    Co-authored-by: Stephan Niewerth <stephan.niewerth@rnd.de>
    stephanniewerth and Stephan Niewerth authored Aug 31, 2020
    Copy the full SHA
    f8ed5cc View commit details
  2. Update CHANGELOG.md

    vearutop authored Aug 31, 2020
    Copy the full SHA
    414b1ff View commit details

Commits on Sep 1, 2020

  1. Fix test for PHP <7.2

    vearutop committed Sep 1, 2020
    Copy the full SHA
    799e74e View commit details

Commits on Sep 22, 2020

  1. Copy the full SHA
    df29f1b View commit details

Commits on Apr 6, 2021

  1. Copy the full SHA
    d6b8fe8 View commit details

Commits on Apr 7, 2021

  1. Copy the full SHA
    c770f32 View commit details

Commits on Apr 12, 2021

  1. Improve JSDoc generation (#38)

    * Improve maps in JSDoc
    * Support optional values in JSDoc
    vearutop authored Apr 12, 2021
    Copy the full SHA
    8ccd339 View commit details

Commits on Apr 25, 2021

  1. Copy the full SHA
    ec0b9e8 View commit details

Commits on May 27, 2021

  1. Copy the full SHA
    7f924e4 View commit details

Commits on Jul 22, 2021

  1. Copy the full SHA
    e172e5e View commit details

Commits on Jan 2, 2022

  1. Copy the full SHA
    5f0fc27 View commit details

Commits on Jan 23, 2022

  1. Copy the full SHA
    f022974 View commit details
  2. Update example (#46)

    vearutop authored Jan 23, 2022
    Copy the full SHA
    c338724 View commit details

Commits on Aug 12, 2022

  1. Copy the full SHA
    6239d4f View commit details

Commits on Sep 15, 2022

  1. Copy the full SHA
    3c4b08e View commit details
  2. Update CHANGELOG.md

    vearutop authored Sep 15, 2022
    Copy the full SHA
    fc0f412 View commit details

Commits on Nov 14, 2022

  1. Copy the full SHA
    29bb39a View commit details
  2. Update CHANGELOG.md

    vearutop authored Nov 14, 2022
    Copy the full SHA
    7720eb5 View commit details

Commits on Aug 3, 2023

  1. Copy the full SHA
    8d1c179 View commit details
  2. Update CHANGELOG.md

    vearutop authored Aug 3, 2023
    Copy the full SHA
    57f9213 View commit details

Commits on Dec 18, 2023

  1. Copy the full SHA
    395ef94 View commit details
  2. Copy the full SHA
    df2abc9 View commit details

Commits on Dec 19, 2023

  1. Copy the full SHA
    2f6ad50 View commit details

Commits on Feb 19, 2024

  1. Copy the full SHA
    f221ec5 View commit details
Showing with 4,204 additions and 897 deletions.
  1. +35 −0 .github/workflows/cloc.yml
  2. +37 −0 .github/workflows/lint.yml
  3. +38 −0 .github/workflows/test-unit-cov.yml
  4. +37 −0 .github/workflows/test-unit.yml
  5. +0 −37 .gitlab-ci.yml
  6. +0 −33 .travis.yml
  7. +147 −0 CHANGELOG.md
  8. +2 −2 Makefile
  9. +4 −0 README.md
  10. +5 −8 composer.json
  11. +392 −204 composer.lock
  12. +5 −1 example.php
  13. +1 −0 src/App/PhpApp.php
  14. +305 −0 src/JSDoc/TypeBuilder.php
  15. +129 −9 src/JsonSchema/PhpBuilder.php
  16. +33 −5 src/JsonSchema/SchemaBuilder.php
  17. +72 −48 src/JsonSchema/SchemaExporterInterface.php
  18. +12 −9 src/JsonSchema/TypeBuilder.php
  19. +562 −0 src/Markdown/TypeBuilder.php
  20. +48 −3 src/PhpClass.php
  21. +21 −0 src/PhpClassProperty.php
  22. +36 −0 src/PhpCode.php
  23. +16 −6 src/PhpDoc.php
  24. +10 −2 src/PhpFunction.php
  25. +10 −2 src/PhpNamedVar.php
  26. +39 −0 src/PhpTrait.php
  27. +1 −1 src/Property/PatternPropertySetter.php
  28. +1 −0 src/Property/Setter.php
  29. +1 −4 src/Traits/Description.php
  30. +1 −1 src/Types/ArrayOf.php
  31. +167 −0 tests/phpunit.patch
  32. +47 −0 tests/resources/JsonSchema/AdvancedTest/testBuildingAdditionalPropertyMethodsOnTrue-new-behavior.txt
  33. +16 −0 tests/resources/JsonSchema/AdvancedTest/testBuildingAdditionalPropertyMethodsOnTrue-old-behavior.txt
  34. +30 −0 tests/resources/duplicate-symbol-declaration-schema.json
  35. +5 −1 tests/resources/entity-schema.json
  36. +111 −46 tests/resources/petstore-openapi3.json
  37. +51 −0 tests/src/PHPUnit/ClassTest.php
  38. +1 −1 tests/src/PHPUnit/FunctionTest.php
  39. +77 −0 tests/src/PHPUnit/Issues/Issue40Test.php
  40. +72 −0 tests/src/PHPUnit/Issues/Issue59Test.php
  41. +286 −0 tests/src/PHPUnit/Issues/IssueJsonCli39Test.php
  42. +52 −0 tests/src/PHPUnit/JSDoc/JSDocTest.php
  43. +400 −24 tests/src/PHPUnit/JsonSchema/AdvancedTest.php
  44. +76 −0 tests/src/PHPUnit/JsonSchema/DuplicateSymbolDeclarationTest.php
  45. +7 −0 tests/src/PHPUnit/JsonSchema/FeatureTest.php
  46. +2 −2 tests/src/PHPUnit/JsonSchema/SchemaTest.php
  47. +4 −2 tests/src/PHPUnit/JsonSchema/TypeBuilderTest.php
  48. +158 −0 tests/src/PHPUnit/Markdown/MarkdownTest.php
  49. +9 −2 tests/src/PHPUnit/OpenAPI3/GenTest.php
  50. +57 −0 tests/src/Tmp/DuplicateSymbolDeclaration/InlineElements/SomeThing.php
  51. +45 −0 tests/src/Tmp/DuplicateSymbolDeclaration/SomeThing.php
  52. +4 −4 tests/src/Tmp/Entity/Entity.php
  53. +54 −53 tests/src/Tmp/Example/Info.php
  54. +43 −42 tests/src/Tmp/Example/Options.php
  55. +82 −81 tests/src/Tmp/Example/User.php
  56. +29 −0 tests/src/Tmp/Issue40/Sample.php
  57. +1 −1 tests/src/Tmp/Issue5/Sample.php
  58. +29 −0 tests/src/Tmp/Issue59/Sample.php
  59. +3 −2 tests/src/Tmp/OpenAPI3/APIKeySecurityScheme.php
  60. +3 −2 tests/src/Tmp/OpenAPI3/AuthorizationCodeOAuthFlow.php
  61. +3 −2 tests/src/Tmp/OpenAPI3/ClientCredentialsFlow.php
  62. +3 −2 tests/src/Tmp/OpenAPI3/Components.php
  63. +3 −2 tests/src/Tmp/OpenAPI3/Contact.php
  64. +5 −8 tests/src/Tmp/OpenAPI3/DefinitionsSchema.php
  65. +1 −1 tests/src/Tmp/OpenAPI3/Discriminator.php
  66. +1 −1 tests/src/Tmp/OpenAPI3/Encoding.php
  67. +4 −5 tests/src/Tmp/OpenAPI3/Example.php
  68. +3 −2 tests/src/Tmp/OpenAPI3/ExternalDocumentation.php
  69. +3 −2 tests/src/Tmp/OpenAPI3/HTTPSecurityScheme.php
  70. +1 −3 tests/src/Tmp/OpenAPI3/HTTPSecuritySchemeNonBearer.php
  71. +4 −5 tests/src/Tmp/OpenAPI3/Header.php
  72. +3 −2 tests/src/Tmp/OpenAPI3/ImplicitOAuthFlow.php
  73. +3 −2 tests/src/Tmp/OpenAPI3/Info.php
  74. +3 −2 tests/src/Tmp/OpenAPI3/License.php
  75. +6 −6 tests/src/Tmp/OpenAPI3/Link.php
  76. +4 −5 tests/src/Tmp/OpenAPI3/MediaType.php
  77. +3 −2 tests/src/Tmp/OpenAPI3/OAuth2SecurityScheme.php
  78. +3 −2 tests/src/Tmp/OpenAPI3/OAuthFlows.php
  79. +3 −2 tests/src/Tmp/OpenAPI3/OpenAPI3Schema.php
  80. +3 −2 tests/src/Tmp/OpenAPI3/OpenIdConnectSecurityScheme.php
  81. +3 −2 tests/src/Tmp/OpenAPI3/Operation.php
  82. +4 −5 tests/src/Tmp/OpenAPI3/Parameter.php
  83. +3 −2 tests/src/Tmp/OpenAPI3/PasswordOAuthFlow.php
  84. +2 −2 tests/src/Tmp/OpenAPI3/PathItem.php
  85. +3 −2 tests/src/Tmp/OpenAPI3/RequestBody.php
  86. +3 −2 tests/src/Tmp/OpenAPI3/Response.php
  87. +4 −3 tests/src/Tmp/OpenAPI3/Responses.php
  88. +3 −2 tests/src/Tmp/OpenAPI3/Server.php
  89. +3 −2 tests/src/Tmp/OpenAPI3/ServerVariable.php
  90. +3 −2 tests/src/Tmp/OpenAPI3/Tag.php
  91. +3 −2 tests/src/Tmp/OpenAPI3/XML.php
  92. +3 −2 tests/src/Tmp/Swagger/ApiKeySecurity.php
  93. +3 −2 tests/src/Tmp/Swagger/BasicAuthenticationSecurity.php
  94. +3 −2 tests/src/Tmp/Swagger/BodyParameter.php
  95. +3 −2 tests/src/Tmp/Swagger/Contact.php
  96. +1 −1 tests/src/Tmp/Swagger/Definitions.php
  97. +8 −11 tests/src/Tmp/Swagger/DefinitionsSchema.php
  98. +1 −1 tests/src/Tmp/Swagger/Examples.php
  99. +3 −2 tests/src/Tmp/Swagger/ExternalDocs.php
  100. +5 −8 tests/src/Tmp/Swagger/FileSchema.php
  101. +3 −4 tests/src/Tmp/Swagger/FormDataParameterSubSchema.php
  102. +4 −5 tests/src/Tmp/Swagger/Header.php
  103. +3 −4 tests/src/Tmp/Swagger/HeaderParameterSubSchema.php
  104. +1 −1 tests/src/Tmp/Swagger/Headers.php
  105. +3 −2 tests/src/Tmp/Swagger/Info.php
  106. +1 −1 tests/src/Tmp/Swagger/JsonReference.php
  107. +3 −2 tests/src/Tmp/Swagger/License.php
  108. +1 −1 tests/src/Tmp/Swagger/NonBodyParameter.php
  109. +3 −2 tests/src/Tmp/Swagger/Oauth2AccessCodeSecurity.php
  110. +3 −2 tests/src/Tmp/Swagger/Oauth2ApplicationSecurity.php
  111. +3 −2 tests/src/Tmp/Swagger/Oauth2ImplicitSecurity.php
  112. +3 −2 tests/src/Tmp/Swagger/Oauth2PasswordSecurity.php
  113. +1 −1 tests/src/Tmp/Swagger/Oauth2Scopes.php
  114. +3 −2 tests/src/Tmp/Swagger/Operation.php
  115. +1 −1 tests/src/Tmp/Swagger/ParameterDefinitions.php
  116. +3 −2 tests/src/Tmp/Swagger/PathItem.php
  117. +3 −4 tests/src/Tmp/Swagger/PathParameterSubSchema.php
  118. +4 −3 tests/src/Tmp/Swagger/Paths.php
  119. +4 −5 tests/src/Tmp/Swagger/PrimitivesItems.php
  120. +3 −4 tests/src/Tmp/Swagger/QueryParameterSubSchema.php
  121. +3 −2 tests/src/Tmp/Swagger/Response.php
  122. +1 −1 tests/src/Tmp/Swagger/ResponseDefinitions.php
  123. +4 −3 tests/src/Tmp/Swagger/Responses.php
  124. +1 −1 tests/src/Tmp/Swagger/SecurityDefinitions.php
  125. +1 −1 tests/src/Tmp/Swagger/SecurityRequirement.php
  126. +3 −2 tests/src/Tmp/Swagger/SwaggerSchema.php
  127. +3 −2 tests/src/Tmp/Swagger/Tag.php
  128. +3 −2 tests/src/Tmp/Swagger/Xml.php
  129. +3 −2 tests/src/Tmp/SwaggerMin/ApiKeySecurity.php
  130. +3 −2 tests/src/Tmp/SwaggerMin/BasicAuthenticationSecurity.php
  131. +3 −2 tests/src/Tmp/SwaggerMin/BodyParameter.php
  132. +3 −2 tests/src/Tmp/SwaggerMin/Contact.php
  133. +8 −11 tests/src/Tmp/SwaggerMin/DefinitionsSchema.php
  134. +3 −2 tests/src/Tmp/SwaggerMin/ExternalDocs.php
  135. +5 −8 tests/src/Tmp/SwaggerMin/FileSchema.php
  136. +3 −4 tests/src/Tmp/SwaggerMin/FormDataParameterSubSchema.php
  137. +4 −5 tests/src/Tmp/SwaggerMin/Header.php
  138. +3 −4 tests/src/Tmp/SwaggerMin/HeaderParameterSubSchema.php
  139. +3 −2 tests/src/Tmp/SwaggerMin/Info.php
  140. +1 −1 tests/src/Tmp/SwaggerMin/JsonReference.php
  141. +3 −2 tests/src/Tmp/SwaggerMin/License.php
  142. +3 −2 tests/src/Tmp/SwaggerMin/Oauth2AccessCodeSecurity.php
  143. +3 −2 tests/src/Tmp/SwaggerMin/Oauth2ApplicationSecurity.php
  144. +3 −2 tests/src/Tmp/SwaggerMin/Oauth2ImplicitSecurity.php
  145. +3 −2 tests/src/Tmp/SwaggerMin/Oauth2PasswordSecurity.php
  146. +3 −2 tests/src/Tmp/SwaggerMin/Operation.php
  147. +3 −2 tests/src/Tmp/SwaggerMin/PathItem.php
  148. +3 −4 tests/src/Tmp/SwaggerMin/PathParameterSubSchema.php
  149. +4 −5 tests/src/Tmp/SwaggerMin/PrimitivesItems.php
  150. +3 −4 tests/src/Tmp/SwaggerMin/QueryParameterSubSchema.php
  151. +3 −2 tests/src/Tmp/SwaggerMin/Response.php
  152. +3 −2 tests/src/Tmp/SwaggerMin/SwaggerSchema.php
  153. +3 −2 tests/src/Tmp/SwaggerMin/Tag.php
  154. +3 −2 tests/src/Tmp/SwaggerMin/Xml.php
35 changes: 35 additions & 0 deletions .github/workflows/cloc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: cloc
on:
pull_request:
jobs:
cloc:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
path: pr
- name: Checkout base code
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.base.sha }}
path: base
- name: Count Lines Of Code
id: loc
run: |
curl -OL https://github.com/vearutop/sccdiff/releases/download/v1.0.1/linux_amd64.tar.gz && tar xf linux_amd64.tar.gz
OUTPUT=$(cd pr && ../sccdiff -basedir ../base)
OUTPUT="${OUTPUT//'%'/'%25'}"
OUTPUT="${OUTPUT//$'\n'/'%0A'}"
OUTPUT="${OUTPUT//$'\r'/'%0D'}"
echo "::set-output name=diff::$OUTPUT"
- name: Comment Code Lines
uses: marocchino/sticky-pull-request-comment@v2
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
header: LOC
message: |
### Lines Of Code
${{ steps.loc.outputs.diff }}
37 changes: 37 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: lint
on:
push:
branches:
- master
- main
pull_request:
jobs:
run:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ 'ubuntu-latest' ]
php-versions: [ '7.4' ]
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Cache vendor
uses: actions/cache@v2
with:
path: |
vendor
key: vendor-${{ hashFiles('composer.lock') }}

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
ini-values: post_max_size=256M, max_execution_time=180
tools: composer

- name: Populate vendor
run: '[ -e vendor ] || composer install'

- name: Lint
run: make lint
38 changes: 38 additions & 0 deletions .github/workflows/test-unit-cov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: test-unit-cov
on:
push:
branches:
- master
- main
pull_request:
jobs:
run:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ 'ubuntu-latest' ]
php-versions: [ '7.4' ]
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Cache vendor
uses: actions/cache@v2
with:
path: |
vendor
key: vendor-${{ hashFiles('composer.lock') }}

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
ini-values: post_max_size=256M, max_execution_time=180
coverage: xdebug
tools: composer

- name: Populate vendor
run: '[ -e vendor ] || composer install'

- name: Run Tests With Coverage
run: make test-coverage && bash <(curl -s https://codecov.io/bash)
37 changes: 37 additions & 0 deletions .github/workflows/test-unit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: test-unit
on:
push:
branches:
- master
- main
pull_request:
jobs:
run:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ 'ubuntu-latest' ]
php-versions: [ '5.6', '7.0', '7.1', '7.2', '7.3', '8.0', '8.1' ]
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Cache vendor
uses: actions/cache@v2
with:
path: |
vendor
key: vendor-${{ hashFiles('composer.lock') }}

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
ini-values: post_max_size=256M, max_execution_time=180
tools: composer

- name: Populate vendor
run: '[ -e vendor ] || composer install'

- name: Run Tests
run: make test
37 changes: 0 additions & 37 deletions .gitlab-ci.yml

This file was deleted.

33 changes: 0 additions & 33 deletions .travis.yml

This file was deleted.

147 changes: 147 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.2.39] - 2023-08-04

### Fixed
- Check for unique type schemas in Markdown rendering.

## [0.2.38] - 2022-11-14

### Fixed
- Handling of `*Of` combinations in generated PHP code.

## [0.2.37] - 2022-09-16

### Added
- Table of contents in Markdown generator.

## [0.2.36] - 2022-08-12

### Added
- Improved markdown generation.

## [0.2.35] - 2022-01-02

### Fixes
- Support for PHP 8.1.

## [0.2.34] - 2021-07-22

### Fixes
- Handling of conflicting constant names for `enum` in generated classes.

## [0.2.33] - 2021-05-27

### Fixes
- Handling of `const` constraints in generated classes.

## [0.2.32] - 2021-04-25

### Added
- Support for Markdown rendering of JSON Schema.
- Support for binary strings (files) in JSDoc.

## [0.2.31] - 2021-04-12

### Added
- Support for optional values in JSDoc.

### Fixed
- Map types in JSDoc.

## [0.2.30] - 2021-04-08

### Added
- Support for const/enum in JSDoc.
- Control to prefix JSDoc types.

## [0.2.29] - 2021-04-07

### Added
- JSDoc type builder from JSON Schema.

## [0.2.28] - 2020-09-22

### Added
- Dependencies updated.

### Fixed
- Missing `default` in generated schema with `swaggest/json-schema` `v0.12.31`.

## [0.2.27] - 2020-08-31

### Fixed
- Duplicated symbol declaration, [#33](https://github.com/swaggest/php-code-builder/pull/33).

## [0.2.26] - 2020-06-16

### Fixed
- `PhpClass` setExtends if getExtends is null in `PhpBuilder`.

## [0.2.25] - 2020-01-10

### Added
- `PhpBuilder` flag `buildAdditionalPropertyMethodsOnTrue` to create accessors for untyped additional properties.

## [0.2.24] - 2020-01-07

### Added
- Option to declare default property values in PHP classes generated from JSON schema, [#29](https://github.com/swaggest/php-code-builder/pull/29).

## [0.2.23] - 2019-12-11

### Added
- Support to use traits in `PhpClass`.

## [0.2.22] - 2019-12-02

### Fixed
- Pattern property setter regexp check.

## [0.2.21] - 2019-10-25

### Changed
- Magical `phpdoc` for nullable properties instead of explicit properties.
- Better property names collision resolution.

## [0.2.20] - 2019-10-02

### Fixed
- Missing return and argument phpdoc types for `array` and `mixed`.

## [0.2.19] - 2019-10-02

### Added
- Schema exporter split into protected methods to allow extension.

## [0.2.18] - 2019-09-22

### Fixed
- Description trimming bug.

[0.2.39]: https://github.com/swaggest/php-code-builder/compare/v0.2.38...v0.2.39
[0.2.38]: https://github.com/swaggest/php-code-builder/compare/v0.2.37...v0.2.38
[0.2.37]: https://github.com/swaggest/php-code-builder/compare/v0.2.36...v0.2.37
[0.2.36]: https://github.com/swaggest/php-code-builder/compare/v0.2.35...v0.2.36
[0.2.35]: https://github.com/swaggest/php-code-builder/compare/v0.2.34...v0.2.35
[0.2.34]: https://github.com/swaggest/php-code-builder/compare/v0.2.33...v0.2.34
[0.2.33]: https://github.com/swaggest/php-code-builder/compare/v0.2.32...v0.2.33
[0.2.32]: https://github.com/swaggest/php-code-builder/compare/v0.2.31...v0.2.32
[0.2.31]: https://github.com/swaggest/php-code-builder/compare/v0.2.30...v0.2.31
[0.2.30]: https://github.com/swaggest/php-code-builder/compare/v0.2.29...v0.2.30
[0.2.29]: https://github.com/swaggest/php-code-builder/compare/v0.2.28...v0.2.29
[0.2.28]: https://github.com/swaggest/php-code-builder/compare/v0.2.27...v0.2.28
[0.2.27]: https://github.com/swaggest/php-code-builder/compare/v0.2.26...v0.2.27
[0.2.26]: https://github.com/swaggest/php-code-builder/compare/v0.2.25...v0.2.26
[0.2.25]: https://github.com/swaggest/php-code-builder/compare/v0.2.24...v0.2.25
[0.2.24]: https://github.com/swaggest/php-code-builder/compare/v0.2.23...v0.2.24
[0.2.23]: https://github.com/swaggest/php-code-builder/compare/v0.2.22...v0.2.23
[0.2.22]: https://github.com/swaggest/php-code-builder/compare/v0.2.21...v0.2.22
[0.2.21]: https://github.com/swaggest/php-code-builder/compare/v0.2.20...v0.2.21
[0.2.20]: https://github.com/swaggest/php-code-builder/compare/v0.2.19...v0.2.20
[0.2.19]: https://github.com/swaggest/php-code-builder/compare/v0.2.18...v0.2.19
[0.2.18]: https://github.com/swaggest/php-code-builder/compare/v0.2.17...v0.2.18
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -8,13 +8,13 @@ lint:
@php $$HOME/.cache/composer/phpstan-${PHPSTAN_VERSION}.phar analyze -l 7 -c phpstan.neon ./src

docker-lint:
@docker run -v $$PWD:/app --rm phpstan/phpstan analyze -l 7 -c phpstan.neon ./src
@docker run -v $$PWD:/app --rm phpstan/phpstan:${PHPSTAN_VERSION} analyze -l 7 -c phpstan.neon ./src

test:
@php -derror_reporting="E_ALL & ~E_DEPRECATED" vendor/bin/phpunit

test-coverage:
@php -derror_reporting="E_ALL & ~E_DEPRECATED" -dzend_extension=xdebug.so vendor/bin/phpunit --coverage-text --coverage-clover=coverage.xml
@php -derror_reporting="E_ALL & ~E_DEPRECATED" -dzend_extension=xdebug.so -dxdebug.mode=coverage vendor/bin/phpunit --coverage-text --coverage-clover=coverage.xml

gen:
@php ./tools/generate_swagger_structures.php
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -130,3 +130,7 @@ $user = \Swaggest\PhpCodeBuilder\Tests\Tmp\Example\User::import(
var_dump($user->info->options->allowNotifications); // bool(false)
```
## CLI Tool
You can use [json-cli](https://github.com/swaggest/json-cli#genphp) to render JSON Schema into PHP classes from command line.
Loading