-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature: upgrade to LTS symfony (#2)
* update composer.json * change autoloading from PSR-0 to PSR-4 * fix test suite * refactor code for php74 * fix PHPStan issues * apply coding standards * update services.xml * update travis-ci configuration * remove php8 + symfony4.4 from travis matrix * update README.md
- Loading branch information
Showing
29 changed files
with
715 additions
and
748 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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = LF | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.php] | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
[{*.json,*.yaml,*.yml}] | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
[{*.less,*.sass,*.scss}] | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
[*.md] | ||
max_line_length = 120 |
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,7 @@ | ||
.idea/* | ||
.phpunit | ||
.phpunit.result.cache | ||
composer.lock | ||
phpunit.xml | ||
var | ||
vendor |
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,9 @@ | ||
build: | ||
nodes: | ||
analysis: | ||
tests: | ||
override: | ||
- php-scrutinizer-run | ||
tools: | ||
external_code_coverage: | ||
timeout: 600 | ||
|
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,8 +1,7 @@ | ||
# TzbSendyBundle | ||
# SendyBundle | ||
|
||
[![SensioLabsInsight](https://insight.sensiolabs.com/projects/df46d30d-af90-4e31-b5af-c7dc4f4bd139/mini.png)](https://insight.sensiolabs.com/projects/df46d30d-af90-4e31-b5af-c7dc4f4bd139) | ||
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/jkabat/TzbSendyBundle/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/jkabat/TzbSendyBundle/?branch=master) | ||
[![Build Status](https://travis-ci.org/jkabat/TzbSendyBundle.svg?branch=master)](https://travis-ci.org/jkabat/TzbSendyBundle) | ||
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/jkabat/sendy-bundle/badges/build.png?b=master)](https://scrutinizer-ci.com/g/jkabat/sendy-bundle/?branch=master) | ||
[![Build Status](https://app.travis-ci.com/jkabat/sendy-bundle.svg?branch=master)](https://app.travis-ci.com/jkabat/sendy-bundle) | ||
|
||
This bundle is used to integrate the [SendyPHP class from Jacob Bennett](https://github.com/JacobBennett/SendyPHP) into a symfony2 project. | ||
|
||
|
@@ -14,7 +13,7 @@ Open a command console, enter your project directory and execute the | |
following command to download the latest stable version of this bundle: | ||
|
||
```bash | ||
$ composer require tzb/sendy-bundle "~1" | ||
$ composer require jkabat/sendy-bundle | ||
``` | ||
|
||
This command requires you to have Composer installed globally, as explained | ||
|
@@ -35,11 +34,11 @@ class AppKernel extends Kernel | |
{ | ||
public function registerBundles() | ||
{ | ||
$bundles = array( | ||
$bundles = [ | ||
// ... | ||
|
||
new Tzb\SendyBundle\TzbSendyBundle(), | ||
); | ||
new Sendy\SendyBundle\SendyBundle(), | ||
]; | ||
|
||
// ... | ||
} | ||
|
@@ -52,9 +51,9 @@ class AppKernel extends Kernel | |
|
||
```yaml | ||
# app/config/config.yml | ||
tzb_sendy: | ||
sendy: | ||
api_key: sendy_api_key | ||
api_host: http://sendy.installation.url | ||
api_host: https://sendy.installation.url | ||
list_id: default_list_id | ||
``` | ||
|
@@ -64,34 +63,34 @@ Get count of total active subscribers for default list: | |
```php | ||
// get service | ||
$sendy = $this->container->get('tzb_sendy.sendy_manager'); | ||
$sendy = $this->container->get('sendy.sendy_manager'); | ||
$count = $sendy->getSubscriberCount(); | ||
``` | ||
|
||
Get count of total active subscribers for other list: | ||
|
||
```php | ||
$sendy = $this->container->get('tzb_sendy.sendy_manager'); | ||
$sendy = $this->container->get('sendy.sendy_manager'); | ||
$count = $sendy->getSubscriberCount('other_list_id'); | ||
``` | ||
|
||
Get status of subscriber identified by e-mail: | ||
|
||
```php | ||
$sendy = $this->container->get('tzb_sendy.sendy_manager'); | ||
$sendy = $this->container->get('sendy.sendy_manager'); | ||
$status = $sendy->getSubscriberStatus('[email protected]'); | ||
``` | ||
|
||
Subscribe user to default list (other list id can be used as third parameter): | ||
|
||
```php | ||
$sendy = $this->container->get('tzb_sendy.sendy_manager'); | ||
$sendy = $this->container->get('sendy.sendy_manager'); | ||
$status = $sendy->subscribe('Name', '[email protected]'); | ||
``` | ||
|
||
Unsubscribe user from default list (other list id can be used as second parameter): | ||
|
||
```php | ||
$sendy = $this->container->get('tzb_sendy.sendy_manager'); | ||
$sendy = $this->container->get('sendy.sendy_manager'); | ||
$status = $sendy->unsubscribe('[email protected]'); | ||
``` |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.