Skip to content
This repository has been archived by the owner on Sep 23, 2020. It is now read-only.

[pull] master from brick:master #4

Open
wants to merge 94 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
933ab87
Fix static properties being treated like non-static
BenMorel Apr 8, 2019
581abba
Do not use echo in closure tests
BenMorel Apr 8, 2019
fbdc00e
Allow php-parser v4.0
BenMorel Apr 8, 2019
1910b9e
Travis CI tests with lowest dependencies
BenMorel Apr 8, 2019
2c49310
Allow failures on PHP 7.4snapshot
BenMorel Apr 8, 2019
3394570
Update example version in README
BenMorel Apr 9, 2019
d17c707
Update project description
BenMorel Apr 9, 2019
4068152
README tweaks
BenMorel Apr 9, 2019
7fae7b3
Notes about eval() and SuperClosure
BenMorel Apr 9, 2019
34b8e6b
Option to inline numeric scalar arrays
BenMorel Apr 16, 2019
8d76720
Update README
BenMorel Apr 16, 2019
7587a58
Note about var_export()ing stdClass objects on PHP 7.3
BenMorel Jun 12, 2019
5aed7d8
Note about anonymous classes
BenMorel Jun 18, 2019
da09a7c
Add note about PHP 7.3 and __set_state()
BenMorel Aug 21, 2019
b5e3bbb
PHP 7.4 is now GA
BenMorel Dec 3, 2019
f6cef92
Object type hints, require PHP 7.2
BenMorel Dec 24, 2019
d94f083
Prepare for release
BenMorel Dec 24, 2019
358fdca
Supported exporting closures with use statements.
jasny Jan 22, 2020
c100112
CS fixes
BenMorel Jan 23, 2020
e318e41
Remove unnecessary space
BenMorel Jan 23, 2020
6ed295c
Test against PHP 8 (nightly)
BenMorel Jan 23, 2020
b3f32a3
Fix composer install on nightly
BenMorel Jan 23, 2020
d0da231
Support for arrow functions (#8)
jasny Jan 23, 2020
d317590
Fix title
BenMorel Jan 23, 2020
4b8b416
Replace spl_object_hash() with spl_object_id()
BenMorel Jan 23, 2020
7150917
Added VarExporter::CLOSURE_SNAPSHOT_USES to README
jasny Jan 24, 2020
59fd646
Support for internal classes providing __set_state() implementation (…
GameplayJDK Mar 13, 2020
ec758c9
Upgrade to PHPUnit 8
BenMorel Mar 20, 2020
6d84889
Update composer.json (#12)
GrahamCampbell Apr 6, 2020
cccc53e
Update README
BenMorel May 4, 2020
b98d894
Update Coveralls badge
BenMorel Aug 21, 2020
17e43b0
Remove .idea from .gitignore
BenMorel Oct 14, 2020
6fbfd93
Travis on PHP 8
BenMorel Dec 5, 2020
5e70b5c
Travis on PHP 8
BenMorel Dec 5, 2020
3b4de48
Update composer.json
BenMorel Dec 6, 2020
28ac47d
Upgrade PHPUnit
BenMorel Dec 14, 2020
b0c5e63
Move CI to GitHub Actions
BenMorel Dec 14, 2020
45969ff
Fix minimum PHPUnit version
BenMorel Dec 14, 2020
18e2b60
Fix exporting objects with dynamic numeric properties
BenMorel Dec 24, 2020
0c21e0f
Psalm level 1
BenMorel Dec 24, 2020
85b4c40
Psalm on GitHub Actions
BenMorel Dec 24, 2020
62cf02e
Fix Psalm issue
BenMorel Dec 24, 2020
831d948
Lock Psalm version
BenMorel Jan 8, 2021
eaa8614
Add support for trailing comma in arrays. (#16)
ADmad Feb 7, 2021
9364f77
Change wording
BenMorel Feb 7, 2021
ae90b0a
Clean up phpdoc for non-existing parameter
BenMorel Feb 7, 2021
6dbe63a
Update Psalm
BenMorel Feb 7, 2021
9f32515
Metadata files (#18)
ADmad Feb 8, 2021
6635221
Fix CI workflow file.
ADmad Feb 9, 2021
c9f9854
Mark public properties as readonly
BenMorel Feb 10, 2021
5e9e8ca
Add argument to control the indentation level. (#17)
ADmad Feb 10, 2021
dcc2524
Minor tweaks
BenMorel Feb 10, 2021
a35c0a0
Add types to tests
BenMorel Feb 10, 2021
bc09fd6
Add note about indentation of first line
BenMorel Feb 10, 2021
1ab6a3f
Add downloads badge
BenMorel Feb 10, 2021
0611a6c
Add GitHub Sponsors
BenMorel Mar 20, 2021
f32d734
Update Psalm
BenMorel Jun 20, 2021
718fdc8
Update README.md
BenMorel Jun 23, 2021
42831ae
Run CI on all branches
BenMorel Jul 27, 2021
48e2c40
Test on PHP 8.1
BenMorel Oct 13, 2021
bb624f1
Fix tests on PHP 8.1
BenMorel Oct 17, 2021
ecdc646
Add missing object type-hints
BenMorel Jun 15, 2022
a5a0f9e
Update Psalm
BenMorel Jun 15, 2022
06f837f
Add support for exporting Enums when using PHP8.1+
Jun 15, 2022
af330e7
Run Psalm on PHP 8.1
BenMorel Jun 15, 2022
754d11c
Run coverage on PHP 8.1
BenMorel Jun 25, 2022
cd6402e
Add CHANGELOG
BenMorel Jun 29, 2022
18e8d96
Rename INLINE_NUMERIC_SCALAR_ARRAY to INLINE_SCALAR_LIST
BenMorel Jun 29, 2022
d48ea79
Remove buggy docblock
BenMorel Jun 29, 2022
be1fe97
Add INLINE_ARRAY option
BenMorel Jun 29, 2022
af6a711
Prepare for release
BenMorel Jun 29, 2022
6047560
Test PHP 8.2
dereuromark Nov 1, 2022
fd0e05a
[master] support public readonly properties, fixes #27 (#28)
AnnaDamm Jan 21, 2023
482749e
Prepare for release
BenMorel Jan 21, 2023
946e00e
Upgrade to Psalm 5.7.5
BenMorel Feb 23, 2023
abc3262
Upgrade to Psalm 5.15.0
BenMorel Sep 1, 2023
bbbf580
Test on PHP 8.3
BenMorel Sep 1, 2023
f9f23ad
Require PHP 7.4
BenMorel Sep 1, 2023
501613f
Typed properties
BenMorel Sep 1, 2023
18d9148
Arrow functions
BenMorel Sep 1, 2023
c413afa
Prepare for release
BenMorel Sep 1, 2023
05b38f4
Remove outdated PHP < 7.3 docs
BenMorel Sep 1, 2023
847ece7
Remove outdated PHP < 7.3 docs, again
BenMorel Sep 1, 2023
73a7208
Small README fixes
BenMorel Sep 1, 2023
949c732
Upgrade Psalm to 5.21.1
BenMorel Feb 4, 2024
2d71f13
Env vars for Psalm & coverage PHP versions, use actions/checkout@v4
BenMorel Apr 25, 2024
798c0ce
Use ramsey/composer-install@v3
BenMorel Apr 25, 2024
069caaf
Use fail-fast: false
BenMorel May 2, 2024
d46e694
Use psalm as phar
snapshotpl Apr 3, 2024
bc6fe0b
Update phpunit
snapshotpl Apr 3, 2024
4b8fe1c
Upgrade to nikic/php-parser v5
BenMorel May 10, 2024
494177b
Remove deprecated INLINE_NUMERIC_SCALAR_ARRAY
BenMorel May 10, 2024
84b2a7a
Prepare for release
BenMorel May 10, 2024
478a9d9
Remove pre-PHP 7.4 wording
BenMorel May 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
; This file is for unifying the coding style for different editors and IDEs.
; More information at http://editorconfig.org

root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false

[*.{yml,yaml}]
indent_size = 2
4 changes: 3 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
.editorconfig export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.travis.yml export-ignore
phpunit.xml export-ignore
psalm.xml export-ignore
README.md export-ignore
.github export-ignore
tests/ export-ignore
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: BenMorel
79 changes: 79 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: CI

on:
push:
pull_request:

env:
PSALM_PHP_VERSION: "8.3"
COVERAGE_PHP_VERSION: "8.3"

jobs:
psalm:
name: Psalm
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.PSALM_PHP_VERSION }}

- name: Install composer dependencies
uses: ramsey/composer-install@v3

- name: Run Psalm
run: vendor/bin/psalm.phar --show-info=false --find-unused-psalm-suppress --no-progress

phpunit:
name: PHPUnit
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
php-version:
- "7.4"
- "8.0"
- "8.1"
- "8.2"
- "8.3"
deps:
- "highest"
include:
- php-version: "7.4"
deps: "lowest"

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
coverage: pcov

- name: Install composer dependencies
uses: ramsey/composer-install@v3
with:
dependency-versions: ${{ matrix.deps }}

- name: Run PHPUnit
run: vendor/bin/phpunit
if: ${{ matrix.php-version != env.COVERAGE_PHP_VERSION }}

- name: Run PHPUnit with coverage
run: |
mkdir -p build/logs
vendor/bin/phpunit --coverage-clover build/logs/clover.xml
if: ${{ matrix.php-version == env.COVERAGE_PHP_VERSION }}

- name: Upload coverage report to Coveralls
run: vendor/bin/php-coveralls --coverage_clover=build/logs/clover.xml -v
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: ${{ matrix.php-version == env.COVERAGE_PHP_VERSION }}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/vendor
/composer.lock
/.phpunit.result.cache
/.idea

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

This file was deleted.

135 changes: 135 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
# Changelog

## [0.5.0](https://github.com/brick/varexporter/releases/tag/0.5.0) - 2024-05-10

✨ **Compatibility**

- Added compatibility with `nikic/php-parser` `5.x`
- Removed compatibility with `nikic/php-parser` `4.x`

💥 **BC breaks**

- deprecated constant `VarExporter::INLINE_NUMERIC_SCALAR_ARRAY` has been removed, please use `INLINE_SCALAR_LIST` instead

## [0.4.0](https://github.com/brick/varexporter/releases/tag/0.4.0) - 2023-09-01

Minimum PHP version is now `7.4`. No breaking changes.

## [0.3.8](https://github.com/brick/varexporter/releases/tag/0.3.8) - 2023-01-22

✨ **New feature**

- Support for PHP 8.1 `readonly` properties (#27, #28)

Thanks @AnnaDamm!

## [0.3.7](https://github.com/brick/varexporter/releases/tag/0.3.7) - 2022-06-30

✨ **New feature**

- New option: `VarExporter::INLINE_ARRAY`

🗑️ **Deprecated**

- The `VarExporter::INLINE_NUMERIC_SCALAR_ARRAY` is deprecated, please use `INLINE_SCALAR_LIST` instead

## [0.3.6](https://github.com/brick/varexporter/releases/tag/0.3.6) - 2022-06-15

✨ **New feature**

Support for PHP 8.1 enums (#23).

Thanks @Jacobs63!

## [0.3.5](https://github.com/brick/varexporter/releases/tag/0.3.5) - 2021-02-10

✨ **New feature**

Support for controlling the base indentation level (#17).

Thanks @ADmad!

## [0.3.4](https://github.com/brick/varexporter/releases/tag/0.3.4) - 2021-02-07

✨ **New feature**

Support for trailing comma in non-inline arrays, with the `TRAILING_COMMA_IN_ARRAY` flag (#16).

Thanks @ADmad!

## [0.3.3](https://github.com/brick/varexporter/releases/tag/0.3.3) - 2020-12-24

🐛 **Bug fix**

- Exporting an object with numeric dynamic properties would lead to a `TypeError`

## [0.3.2](https://github.com/brick/varexporter/releases/tag/0.3.2) - 2020-03-13

✨ **New feature**

Support for exporting internal classes implementing `__set_state()`:

- `DateTime`
- `DateTimeImmutable`
- `DateTimeZone`
- `DateInterval`
- `DatePeriod`

Thanks @GameplayJDK!

## [0.3.1](https://github.com/brick/varexporter/releases/tag/0.3.1) - 2020-01-23

✨ **New features**

- Support for closures with `use()` using the `CLOSURE_SNAPSHOT_USE` option (#7)
- Support for arrow functions in PHP 7.4 (#8)

Thanks to @jasny for his awesome work!

## [0.3.0](https://github.com/brick/varexporter/releases/tag/0.3.0) - 2019-12-24

Minimum PHP version is now `7.2`. No breaking changes.

## [0.2.1](https://github.com/brick/varexporter/releases/tag/0.2.1) - 2019-04-16

✨ **New option**: `VarExporter::INLINE_NUMERIC_SCALAR_ARRAY` (#3)

Formats numeric arrays containing only scalar values on a single line.

## [0.2.0](https://github.com/brick/varexporter/releases/tag/0.2.0) - 2019-04-09

✨ **New feature**

- Experimental support for closures 🎉

💥 **Minor BC break**

- `export()` does not throw an exception anymore when encountering a `Closure`.
To get the old behaviour back, use the `NO_CLOSURES` option.

## [0.1.2](https://github.com/brick/varexporter/releases/tag/0.1.2) - 2019-04-08

🐛 **Bug fixes**

- Static properties in custom classes were wrongly included—`unset()`—in the output

✨ **Improvements**

- Circular references are now detected, and throw an `ExportException` instead of erroring.

## [0.1.1](https://github.com/brick/varexporter/releases/tag/0.1.1) - 2019-04-08

🐛 **Bug fixes**

- Single-letter properties were wrongly exported using `->{'x'}` notation.

✨ **Improvements**

- Exception messages now contain the path (array keys / object properties) to the failure:

> `[foo][bar][0]` Type "resource" is not supported.

## [0.1.0](https://github.com/brick/varexporter/releases/tag/0.1.0) - 2019-04-07

First release.

Loading