-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from Yproximite/symfony-compatibility
Symfony compatibility
- Loading branch information
Showing
46 changed files
with
4,639 additions
and
570 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
/bin/ | ||
/vendor/ | ||
composer.lock | ||
vendor/ | ||
bin/* | ||
.php_cs.cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
$finder = PhpCsFixer\Finder::create() | ||
->in(__DIR__) | ||
->exclude('var') | ||
; | ||
|
||
return PhpCsFixer\Config::create() | ||
->setRiskyAllowed(true) | ||
->setRules([ | ||
'@Symfony' => true, | ||
'array_syntax' => [ | ||
'syntax' => 'short', | ||
], | ||
'binary_operator_spaces' => [ | ||
'align_double_arrow' => true, | ||
'align_equals' => true | ||
], | ||
'no_unreachable_default_argument_value' => false, | ||
'braces' => [ | ||
'allow_single_line_closure' => true, | ||
], | ||
'heredoc_to_nowdoc' => false, | ||
'phpdoc_summary' => false, | ||
'declare_strict_types' => true, | ||
]) | ||
->setFinder($finder) | ||
; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
dist: bionic | ||
|
||
language: php | ||
|
||
cache: | ||
directories: | ||
- vendor | ||
- ~/.composer/cache/files | ||
|
||
env: | ||
global: | ||
- COMPOSER_MEMORY_LIMIT=-1 | ||
|
||
matrix: | ||
fast_finish: true | ||
include: | ||
# Minimum supported dependencies with the latest and oldest PHP version | ||
- php: 7.2 | ||
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" SYMFONY_DEPRECATIONS_HELPER="max[self]=0" | ||
- php: 7.3 | ||
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" SYMFONY_DEPRECATIONS_HELPER="max[self]=0" | ||
- php: 7.4 | ||
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" SYMFONY_DEPRECATIONS_HELPER="max[self]=0" | ||
|
||
# Test the latest stable release | ||
- php: 7.2 | ||
- php: 7.3 | ||
- php: 7.4 | ||
|
||
# Test specific Symfony versions | ||
- php: 7.4 | ||
env: SYMFONY_VERSION="4.4.11" # LTS | ||
- php: 7.4 | ||
env: SYMFONY_VERSION="4.*" # Last 4.x version | ||
- php: 7.4 | ||
env: SYMFONY_VERSION="5.*" # Last 5.x version | ||
|
||
# Latest commit to master | ||
- php: 7.4 | ||
env: STABILITY="dev" | ||
|
||
allow_failures: | ||
# Dev-master is allowed to fail. | ||
- env: STABILITY="dev" | ||
- env: SYMFONY_VERSION="5.*" | ||
|
||
before_install: | ||
- phpenv config-rm xdebug.ini | ||
- if ! [ -z "$STABILITY" ]; then composer config minimum-stability ${STABILITY}; fi; | ||
- composer require --no-update symfony/flex ${DEPENDENCIES} | ||
- if ! [ -z "$SYMFONY_VERSION" ]; then composer config extra.symfony.require "${SYMFONY_VERSION}"; fi; | ||
|
||
before_script: | ||
- if [ -n "$GH_TOKEN" ]; then composer config github-oauth.github.com ${GH_TOKEN}; fi; | ||
- composer install --no-interaction --prefer-dist | ||
|
||
install: | ||
- composer update ${COMPOSER_FLAGS} --prefer-dist --no-interaction | ||
|
||
script: | ||
- bin/php-cs-fixer fix --verbose --diff --dry-run Mixpanel/ | ||
- bin/phpspec run -f dot -n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of the mixpanel bundle. | ||
* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of the mixpanel bundle. | ||
* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of the mixpanel bundle. | ||
* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of the mixpanel bundle. | ||
* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of the mixpanel bundle. | ||
* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of the mixpanel bundle. | ||
* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of the mixpanel bundle. | ||
* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
### v3.0 | ||
|
||
- Changed autoload from PSR-0 to PSR-4 | ||
- v3 now supports Symfony 4.4+ and Symfony 5.0+ | ||
- Uses version ~2.8 of `mixpanel/mixpanel-php` | ||
- Using the autowiring | ||
- Remove compatibility with old Symfony versions not maintained | ||
- Setting up Travis + Php-cs Fixer | ||
- Add ``auto_update_user`` parameter in order to send user data on each request | ||
- Add ``enable`` parameter in order to enable/disable send data to Mixpanel | ||
- Add ``extra_data`` config to send more user data | ||
- Create ``MixpanelEvent`` if you want to send data without annotation | ||
- Be able to use ``Expression`` in props | ||
```php | ||
* @Mixpanel\Track("Order Completed", props={ | ||
* "user": @Mixpanel\Expression("user.getId()") | ||
* }) | ||
``` | ||
- Some fixes (event name, getId not exist, ...) | ||
- Update Readme | ||
|
Oops, something went wrong.