Skip to content

Commit 0158eee

Browse files
committed
Refactor after transfer to official repo (need to test in Symfony env)
1 parent 6b33dd7 commit 0158eee

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+307
-272
lines changed

CONTRIBUTING.md

+5
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,8 @@
77
1. Create an Issue
88
2. Pull Request
99
3. Merge \o/
10+
11+
## Contributors
12+
13+
* Original author: [Titouan BENOIT](https://github.com/Nightbr)
14+
* Mailjet API <[email protected]>

LICENSE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2016 Welp
3+
Copyright (c) 2017 Mailjet
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Mailjet Bundle
22

3-
[![Build Status](https://travis-ci.org/welpdev/mailjetBundle.svg?branch=master)](https://travis-ci.org/welpdev/mailjetBundle)
4-
[![Packagist](https://img.shields.io/packagist/v/welp/mailjet-bundle.svg)](https://packagist.org/packages/welp/mailjet-bundle)
5-
[![Packagist](https://img.shields.io/packagist/dt/welp/mailjet-bundle.svg)](https://packagist.org/packages/welp/mailjet-bundle)
6-
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/welpdev/mailjetBundle/blob/master/LICENSE.md)
7-
[![Documentation](https://img.shields.io/badge/documentation-gh--pages-blue.svg)](https://welpdev.github.io/mailjetBundle/)
3+
[![Build Status](https://travis-ci.org/mailjet/mailjetBundle.svg?branch=master)](https://travis-ci.org/mailjet/mailjetBundle)
4+
[![Packagist](https://img.shields.io/packagist/v/mailjet/mailjet-bundle.svg)](https://packagist.org/packages/mailjet/mailjet-bundle)
5+
[![Packagist](https://img.shields.io/packagist/dt/mailjet/mailjet-bundle.svg)](https://packagist.org/packages/mailjet/mailjet-bundle)
6+
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/mailjet/mailjetBundle/blob/master/LICENSE.md)
7+
[![Documentation](https://img.shields.io/badge/documentation-gh--pages-blue.svg)](https://mailjet.github.io/mailjetBundle/)
88

99
Symfony bundle for handling Mailjet API V3 using this wrapper: <https://github.com/mailjet/mailjet-apiv3-php>
1010

@@ -13,7 +13,7 @@ Symfony bundle for handling Mailjet API V3 using this wrapper: <https://github.c
1313
## Features
1414

1515
* [x] Retrieve [\Mailjet\Client](https://github.com/mailjet/mailjet-apiv3-php) to make custom Mailjet API V3 requests
16-
* [x] [SwiftMailer Transport integration](https://github.com/welpdev/MailjetSwiftMailer)
16+
* [x] [SwiftMailer Transport integration](https://github.com/mailjet/MailjetSwiftMailer)
1717
* [x] Synchronize Contact Metadata (Contact Properties) with your config
1818
* [x] Synchronize your user with Mailjet contact list
1919
* [x] Use your own userProvider (basic `FosContactProvider` included to interface with FosUserBundle)
@@ -25,15 +25,15 @@ Symfony bundle for handling Mailjet API V3 using this wrapper: <https://github.c
2525
Add bundle to your project:
2626

2727
```bash
28-
composer require welp/mailjet-bundle
28+
composer require mailjet/mailjet-bundle
2929
```
3030

31-
Add `Welp\MailjetBundle\WelpMailjetBundle` to your `AppKernel.php`:
31+
Add `Mailjet\MailjetBundle\MailjetBundle` to your `AppKernel.php`:
3232

3333
```php
3434
$bundles = [
3535
// ...
36-
new Welp\MailjetBundle\WelpMailjetBundle(),
36+
new Mailjet\MailjetBundle\MailjetBundle(),
3737
];
3838
```
3939

@@ -42,9 +42,9 @@ $bundles = [
4242
In your `config.yml`:
4343

4444
```yaml
45-
welp_mailjet:
46-
api_key: "%mailjet_api_key%"
47-
secret_key: "%mailjet_secret_key%"
45+
mailjet:
46+
api_key: "%mailjet.api_key%"
47+
secret_key: "%mailjet.secret_key%"
4848
```
4949
5050
## ToDo

composer.json

+11-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
{
2-
"name": "welp/mailjet-bundle",
2+
"name": "mailjet/mailjet-bundle",
33
"description": "Symfony bundle for Mailjet API V3",
4-
"version": "1.0.0-beta.1",
54
"type": "symfony-bundle",
6-
"homepage": "https://github.com/welpdev/mailjetBundle",
5+
"homepage": "https://github.com/mailjet/mailjetBundle",
76
"license": "MIT",
87
"keywords": [
98
"Symfony",
@@ -16,18 +15,24 @@
1615
"authors": [
1716
{
1817
"name": "Titouan BENOIT",
19-
"email": "[email protected]"
18+
"email": "[email protected]",
19+
"homepage": "https://github.com/Nightbr"
20+
},
21+
{
22+
"name": "Mailjet API",
23+
"email": "[email protected]",
24+
"homepage": "https://dev.mailjet.com/"
2025
}
2126
],
2227
"autoload": {
2328
"psr-4": {
24-
"Welp\\MailjetBundle\\": "src/"
29+
"Mailjet\\MailjetBundle\\": "src/"
2530
}
2631
},
2732
"require": {
2833
"php": ">=5.6",
2934
"mailjet/mailjet-apiv3-php": "^1.2",
30-
"welp/mailjet-swiftmailer": "dev-master"
35+
"mailjet/mailjet-swiftmailer": "dev-master"
3136
},
3237
"require-dev": {
3338
"phpspec/phpspec": "~2@dev",

mkdocs.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ site_name: Mailjet Bundle
22
site_description: Symfony bundle for handling Mailjet API V3.
33
site_author: Titouan BENOIT
44
copyright: MIT
5-
repo_url: https://github.com/welpdev/mailjetBundle
5+
repo_url: https://github.com/mailjet/mailjetBundle
66
docs_dir: 'src/Resources/doc'
77
site_dir: "docs"
88
pages:
@@ -15,6 +15,7 @@ pages:
1515
- Event API (webhook): event-api.md
1616
- Symfony Debug Toolbar: symfony-debug-toolbar.md
1717
- Tests: tests.md
18+
- Build Documentation: build-documentation.md
1819
- Mailjet Doc: mailjet-doc.md
1920
- Contributing: CONTRIBUTING.md
2021
theme: readthedocs

phpspec.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
suites:
22
default:
3-
namespace: Welp\MailjetBundle
4-
psr4_prefix: Welp\MailjetBundle
3+
namespace: Mailjet\MailjetBundle
4+
psr4_prefix: Mailjet\MailjetBundle

spec/Command/EventCommandSpec.php

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace spec\Welp\MailjetBundle\Command;
3+
namespace spec\Mailjet\MailjetBundle\Command;
44

55
use Symfony\Component\DependencyInjection\ContainerInterface;
66
use PhpSpec\ObjectBehavior;
@@ -9,8 +9,8 @@
99
class EventCommandSpec extends ObjectBehavior
1010
{
1111
private $uri = '/mailjet-callback';
12-
private $baseurl = 'https://www.welp.fr';
13-
private $routeName = 'welp_mailjet_endpoint';
12+
private $baseurl = 'https://www.mailjet.fr';
13+
private $routeName = 'mailjet_endpoint';
1414

1515
/**
1616
* @param \Symfony\Component\DependencyInjection\ContainerInterface $container
@@ -22,7 +22,7 @@ function let(ContainerInterface $container)
2222

2323
function it_is_initializable()
2424
{
25-
$this->shouldHaveType('Welp\MailjetBundle\Command\EventCommand');
25+
$this->shouldHaveType('Mailjet\MailjetBundle\Command\EventCommand');
2626
}
2727

2828
/**
@@ -64,8 +64,8 @@ private function prepareMocks($input, $container, $router, $token)
6464
$input->hasArgument(Argument::any())->willReturn(false);
6565
$input->bind(Argument::any())->shouldBeCalled();
6666
$input->getArgument('baseurl')->shouldBeCalled()->willReturn($this->baseurl);
67-
$container->getParameter('welp_mailjet.event_endpoint_route')->shouldBeCalled()->willReturn($this->routeName);
68-
$container->getParameter('welp_mailjet.event_endpoint_token')->shouldBeCalled()->willReturn($token);
67+
$container->getParameter('mailjet.event_endpoint_route')->shouldBeCalled()->willReturn($this->routeName);
68+
$container->getParameter('mailjet.event_endpoint_token')->shouldBeCalled()->willReturn($token);
6969

7070
$uri = $this->uri.($token ? '/'.$token : '');
7171
$router->generate($this->routeName, array('token' => $token))->shouldBeCalled()->willReturn($uri);

spec/Command/SyncUserCommandSpec.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace spec\Welp\MailjetBundle\Command;
3+
namespace spec\Mailjet\MailjetBundle\Command;
44

55
use PhpSpec\ObjectBehavior;
66
use Prophecy\Argument;
@@ -9,6 +9,6 @@ class SyncUserCommandSpec extends ObjectBehavior
99
{
1010
function it_is_initializable()
1111
{
12-
$this->shouldHaveType('Welp\MailjetBundle\Command\SyncUserCommand');
12+
$this->shouldHaveType('Mailjet\MailjetBundle\Command\SyncUserCommand');
1313
}
1414
}
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace spec\Welp\MailjetBundle\Controller;
3+
namespace spec\Mailjet\MailjetBundle\Controller;
44

55
use PhpSpec\ObjectBehavior;
66
use Prophecy\Argument;
@@ -9,6 +9,6 @@ class EventControllerSpec extends ObjectBehavior
99
{
1010
function it_is_initializable()
1111
{
12-
$this->shouldHaveType('Welp\MailjetBundle\Controller\EventController');
12+
$this->shouldHaveType('Mailjet\MailjetBundle\Controller\EventController');
1313
}
1414
}

spec/Event/CallbackEventSpec.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace spec\Welp\MailjetBundle\Event;
3+
namespace spec\Mailjet\MailjetBundle\Event;
44

55
use PhpSpec\ObjectBehavior;
66
use Prophecy\Argument;
@@ -24,6 +24,6 @@ public function let()
2424

2525
public function it_is_initializable()
2626
{
27-
$this->shouldHaveType('Welp\MailjetBundle\Event\CallbackEvent');
27+
$this->shouldHaveType('Mailjet\MailjetBundle\Event\CallbackEvent');
2828
}
2929
}

spec/Event/ContactEventSpec.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?php
22

3-
namespace spec\Welp\MailjetBundle\Event;
3+
namespace spec\Mailjet\MailjetBundle\Event;
44

55
use PhpSpec\ObjectBehavior;
66
use Prophecy\Argument;
77

8-
use Welp\MailjetBundle\Model\Contact;
8+
use Mailjet\MailjetBundle\Model\Contact;
99

1010
class ContactEventSpec extends ObjectBehavior
1111
{
@@ -16,6 +16,6 @@ public function let(Contact $contact)
1616

1717
public function it_is_initializable()
1818
{
19-
$this->shouldHaveType('Welp\MailjetBundle\Event\ContactEvent');
19+
$this->shouldHaveType('Mailjet\MailjetBundle\Event\ContactEvent');
2020
}
2121
}

spec/Listener/ContactListenerSpec.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?php
22

3-
namespace spec\Welp\MailjetBundle\Listener;
3+
namespace spec\Mailjet\MailjetBundle\Listener;
44

55
use PhpSpec\ObjectBehavior;
66
use Prophecy\Argument;
77

8-
use Welp\MailjetBundle\Manager\ContactsListManager;
8+
use Mailjet\MailjetBundle\Manager\ContactsListManager;
99

1010
class ContactListenerSpec extends ObjectBehavior
1111
{
@@ -16,6 +16,6 @@ public function let(ContactsListManager $contactsListManager)
1616

1717
public function it_is_initializable()
1818
{
19-
$this->shouldHaveType('Welp\MailjetBundle\Listener\ContactListener');
19+
$this->shouldHaveType('Mailjet\MailjetBundle\Listener\ContactListener');
2020
}
2121
}
+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?php
22

3-
namespace spec\Welp\MailjetBundle\Manager;
3+
namespace spec\Mailjet\MailjetBundle\Manager;
44

55
use PhpSpec\ObjectBehavior;
66
use Prophecy\Argument;
7-
use Welp\MailjetBundle\Client\MailjetClient;
7+
use Mailjet\MailjetBundle\Client\MailjetClient;
88

99
class ContactsListManagerSpec extends ObjectBehavior
1010
{
@@ -15,6 +15,6 @@ public function let(MailjetClient $mailjet)
1515

1616
public function it_is_initializable()
1717
{
18-
$this->shouldHaveType('Welp\MailjetBundle\Manager\ContactsListManager');
18+
$this->shouldHaveType('Mailjet\MailjetBundle\Manager\ContactsListManager');
1919
}
2020
}
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?php
22

3-
namespace spec\Welp\MailjetBundle\Manager;
3+
namespace spec\Mailjet\MailjetBundle\Manager;
44

55
use PhpSpec\ObjectBehavior;
66
use Prophecy\Argument;
7-
use Welp\MailjetBundle\Client\MailjetClient;
7+
use Mailjet\MailjetBundle\Client\MailjetClient;
88

99
class EventCallbackUrlManagerSpec extends ObjectBehavior
1010
{
@@ -15,6 +15,6 @@ public function let(MailjetClient $mailjet)
1515

1616
public function it_is_initializable()
1717
{
18-
$this->shouldHaveType('Welp\MailjetBundle\Manager\EventCallbackUrlManager');
18+
$this->shouldHaveType('Mailjet\MailjetBundle\Manager\EventCallbackUrlManager');
1919
}
2020
}

spec/Model/ContactSpec.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace spec\Welp\MailjetBundle\Model;
3+
namespace spec\Mailjet\MailjetBundle\Model;
44

55
use PhpSpec\ObjectBehavior;
66
use Prophecy\Argument;
@@ -14,7 +14,7 @@ public function let()
1414

1515
public function it_is_initializable()
1616
{
17-
$this->shouldHaveType('Welp\MailjetBundle\Model\Contact');
17+
$this->shouldHaveType('Mailjet\MailjetBundle\Model\Contact');
1818
}
1919

2020

spec/Model/ContactsListSpec.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<?php
22

3-
namespace spec\Welp\MailjetBundle\Model;
3+
namespace spec\Mailjet\MailjetBundle\Model;
44

55
use PhpSpec\ObjectBehavior;
66
use Prophecy\Argument;
77

8-
use Welp\MailjetBundle\Model\Contact;
9-
use Welp\MailjetBundle\Model\ContactsList;
8+
use Mailjet\MailjetBundle\Model\Contact;
9+
use Mailjet\MailjetBundle\Model\ContactsList;
1010

1111
class ContactsListSpec extends ObjectBehavior
1212
{
@@ -22,6 +22,6 @@ public function let()
2222

2323
public function it_is_initializable()
2424
{
25-
$this->shouldHaveType('Welp\MailjetBundle\Model\ContactsList');
25+
$this->shouldHaveType('Mailjet\MailjetBundle\Model\ContactsList');
2626
}
2727
}

spec/Model/EventCallbackUrlSpec.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace spec\Welp\MailjetBundle\Model;
3+
namespace spec\Mailjet\MailjetBundle\Model;
44

55
use PhpSpec\ObjectBehavior;
66
use Prophecy\Argument;
@@ -14,6 +14,6 @@ public function let()
1414

1515
public function it_is_initializable()
1616
{
17-
$this->shouldHaveType('Welp\MailjetBundle\Model\EventCallbackUrl');
17+
$this->shouldHaveType('Mailjet\MailjetBundle\Model\EventCallbackUrl');
1818
}
1919
}
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?php
22

3-
namespace spec\Welp\MailjetBundle\Synchronizer;
3+
namespace spec\Mailjet\MailjetBundle\Synchronizer;
44

55
use PhpSpec\ObjectBehavior;
66
use Prophecy\Argument;
7-
use Welp\MailjetBundle\Client\MailjetClient;
7+
use Mailjet\MailjetBundle\Client\MailjetClient;
88

99
class ContactsListSynchronizerSpec extends ObjectBehavior
1010
{
@@ -15,6 +15,6 @@ public function let(MailjetClient $mailjet)
1515

1616
public function it_is_initializable()
1717
{
18-
$this->shouldHaveType('Welp\MailjetBundle\Synchronizer\ContactsListSynchronizer');
18+
$this->shouldHaveType('Mailjet\MailjetBundle\Synchronizer\ContactsListSynchronizer');
1919
}
2020
}

src/Client/MailjetClient.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
namespace Welp\MailjetBundle\Client;
2+
namespace Mailjet\MailjetBundle\Client;
33

44
use Mailjet\Client;
55
use Mailjet\Response;

0 commit comments

Comments
 (0)