Skip to content

Commit 01ee312

Browse files
oliverkleeSam Tuke
authored and
Sam Tuke
committed
[CLEANUP] Change core namespace from PhpList\PhpList4 to PhpList\Core (#290)
Fixes #273
1 parent d05b54e commit 01ee312

File tree

85 files changed

+306
-305
lines changed

Some content is hidden

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

85 files changed

+306
-305
lines changed

CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# phpList 4 core change log
1+
# phpList core change log
22

33
All notable changes to this project will be documented in this file.
44
This project adheres to [Semantic Versioning](https://semver.org/).
@@ -15,6 +15,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
1515
- Bidirectional m:n association Subscribers/SubscriberLists (#254)
1616

1717
### Changed
18+
- Change the core namespace from PhpList\PhpList4 to PhpList\Core (#290)
1819
- Depend on Symfony 3.4.0 as minimum version (#288)
1920
- Move the PHPUnit configuration file (#283)
2021
- Rename the Composer package to "phplist/core" (#275)

Configuration/PHPMD/rules.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
\Doctrine\ORM\EntityManager,
1313
\Doctrine\ORM\Tools\Setup,
1414
\FOS\RestBundle\View\View,
15-
\PhpList\PhpList4\Core\Bootstrap,
16-
\PhpList\PhpList4\Core\Environment,
15+
\PhpList\Core\Core\Bootstrap,
16+
\PhpList\Core\Core\Environment,
1717
\PHPUnit\DbUnit\Operation\Factory,
1818
\Symfony\Component\Debug\Debug,
1919
\Symfony\Component\Yaml\Yaml,

Configuration/config.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ doctrine:
5151
naming_strategy: doctrine.orm.naming_strategy.underscore
5252
auto_mapping: true
5353
mappings:
54-
PhpList\PhpList4\Domain\Model:
54+
PhpList\Core\Domain\Model:
5555
type: annotation
5656
is_bundle: false
57-
prefix: PhpList\PhpList4\Domain\Model
57+
prefix: PhpList\Core\Domain\Model
5858
dir: '%kernel.project_dir%/src/Domain/Model/'

Configuration/repositories.yml

+15-15
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
services:
2-
PhpList\PhpList4\Domain\Repository\Identity\AdministratorRepository:
3-
parent: PhpList\PhpList4\Domain\Repository
2+
PhpList\Core\Domain\Repository\Identity\AdministratorRepository:
3+
parent: PhpList\Core\Domain\Repository
44
arguments:
5-
- PhpList\PhpList4\Domain\Model\Identity\Administrator
5+
- PhpList\Core\Domain\Model\Identity\Administrator
66

7-
PhpList\PhpList4\Domain\Repository\Identity\AdministratorTokenRepository:
8-
parent: PhpList\PhpList4\Domain\Repository
7+
PhpList\Core\Domain\Repository\Identity\AdministratorTokenRepository:
8+
parent: PhpList\Core\Domain\Repository
99
arguments:
10-
- PhpList\PhpList4\Domain\Model\Identity\AdministratorToken
10+
- PhpList\Core\Domain\Model\Identity\AdministratorToken
1111

12-
PhpList\PhpList4\Domain\Repository\Messaging\SubscriberListRepository:
13-
parent: PhpList\PhpList4\Domain\Repository
12+
PhpList\Core\Domain\Repository\Messaging\SubscriberListRepository:
13+
parent: PhpList\Core\Domain\Repository
1414
arguments:
15-
- PhpList\PhpList4\Domain\Model\Messaging\SubscriberList
15+
- PhpList\Core\Domain\Model\Messaging\SubscriberList
1616

17-
PhpList\PhpList4\Domain\Repository\Subscription\SubscriberRepository:
18-
parent: PhpList\PhpList4\Domain\Repository
17+
PhpList\Core\Domain\Repository\Subscription\SubscriberRepository:
18+
parent: PhpList\Core\Domain\Repository
1919
arguments:
20-
- PhpList\PhpList4\Domain\Model\Subscription\Subscriber
20+
- PhpList\Core\Domain\Model\Subscription\Subscriber
2121

22-
PhpList\PhpList4\Domain\Repository\Subscription\SubscriptionRepository:
23-
parent: PhpList\PhpList4\Domain\Repository
22+
PhpList\Core\Domain\Repository\Subscription\SubscriptionRepository:
23+
parent: PhpList\Core\Domain\Repository
2424
arguments:
25-
- PhpList\PhpList4\Domain\Model\Subscription\Subscription
25+
- PhpList\Core\Domain\Model\Subscription\Subscription

Configuration/services.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,19 @@ services:
99
# if you need to do this, you can override this setting on individual services
1010
public: false
1111

12-
PhpList\PhpList4\Core\ApplicationStructure:
12+
PhpList\Core\Core\ApplicationStructure:
1313
public: true
1414

15-
PhpList\PhpList4\Security\Authentication:
15+
PhpList\Core\Security\Authentication:
1616
public: true
1717

18-
PhpList\PhpList4\Security\HashGenerator:
18+
PhpList\Core\Security\HashGenerator:
1919
public: true
2020

21-
PhpList\PhpList4\Routing\ExtraLoader:
21+
PhpList\Core\Routing\ExtraLoader:
2222
tags: [routing.loader]
2323

24-
PhpList\PhpList4\Domain\Repository:
24+
PhpList\Core\Domain\Repository:
2525
abstract: true
2626
autowire: true
2727
autoconfigure: false
@@ -30,7 +30,7 @@ services:
3030

3131
# controllers are imported separately to make sure they're public
3232
# and have a tag that allows actions to type-hint services
33-
PhpList\PhpList4\EmptyStartPageBundle\Controller\:
33+
PhpList\Core\EmptyStartPageBundle\Controller\:
3434
resource: '../src/EmptyStartPageBundle/Controller'
3535
public: true
3636
tags: [controller.service_arguments]

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ listed in the `extra` section of the module's `composer.json` like this:
121121
"phplist/core": {
122122
"bundles": [
123123
"Symfony\\Bundle\\FrameworkBundle\\FrameworkBundle",
124-
"PhpList\\PhpList4\\EmptyStartPageBundle\\PhpListEmptyStartPageBundle"
124+
"PhpList\\Core\\EmptyStartPageBundle\\PhpListEmptyStartPageBundle"
125125
]
126126
}
127127
}

bin/console

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
<?php
33
declare(strict_types=1);
44

5-
use PhpList\PhpList4\Core\ApplicationKernel;
6-
use PhpList\PhpList4\Core\Bootstrap;
7-
use PhpList\PhpList4\Core\Environment;
5+
use PhpList\Core\Core\ApplicationKernel;
6+
use PhpList\Core\Core\Bootstrap;
7+
use PhpList\Core\Core\Environment;
88
use Symfony\Bundle\FrameworkBundle\Console\Application;
99
use Symfony\Component\Console\Input\ArgvInput;
1010
use Symfony\Component\Debug\Debug;

composer.json

+9-9
Original file line numberDiff line numberDiff line change
@@ -63,24 +63,24 @@
6363
},
6464
"autoload": {
6565
"psr-4": {
66-
"PhpList\\PhpList4\\": "src/"
66+
"PhpList\\Core\\": "src/"
6767
}
6868
},
6969
"autoload-dev": {
7070
"psr-4": {
71-
"PhpList\\PhpList4\\Tests\\": "tests/"
71+
"PhpList\\Core\\Tests\\": "tests/"
7272
}
7373
},
7474
"scripts": {
7575
"list-modules": [
76-
"PhpList\\PhpList4\\Composer\\ScriptHandler::listModules"
76+
"PhpList\\Core\\Composer\\ScriptHandler::listModules"
7777
],
7878
"update-configuration": [
79-
"PhpList\\PhpList4\\Composer\\ScriptHandler::createGeneralConfiguration",
80-
"PhpList\\PhpList4\\Composer\\ScriptHandler::createBundleConfiguration",
81-
"PhpList\\PhpList4\\Composer\\ScriptHandler::createRoutesConfiguration",
82-
"PhpList\\PhpList4\\Composer\\ScriptHandler::createParametersConfiguration",
83-
"PhpList\\PhpList4\\Composer\\ScriptHandler::clearAllCaches"
79+
"PhpList\\Core\\Composer\\ScriptHandler::createGeneralConfiguration",
80+
"PhpList\\Core\\Composer\\ScriptHandler::createBundleConfiguration",
81+
"PhpList\\Core\\Composer\\ScriptHandler::createRoutesConfiguration",
82+
"PhpList\\Core\\Composer\\ScriptHandler::createParametersConfiguration",
83+
"PhpList\\Core\\Composer\\ScriptHandler::clearAllCaches"
8484
],
8585
"post-install-cmd": [
8686
"@update-configuration"
@@ -105,7 +105,7 @@
105105
"Symfony\\Bundle\\MonologBundle\\MonologBundle",
106106
"JMS\\SerializerBundle\\JMSSerializerBundle",
107107
"Doctrine\\Bundle\\DoctrineBundle\\DoctrineBundle",
108-
"PhpList\\PhpList4\\EmptyStartPageBundle\\PhpListEmptyStartPageBundle"
108+
"PhpList\\Core\\EmptyStartPageBundle\\PhpListEmptyStartPageBundle"
109109
],
110110
"routes": {
111111
"homepage": {

phpunit.xml.dist

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
>
1010
<php>
1111
<ini name="error_reporting" value="-1"/>
12-
<server name="KERNEL_CLASS" value="PhpList\PhpList4\Core\ApplicationKernel"/>
12+
<server name="KERNEL_CLASS" value="PhpList\Core\Core\ApplicationKernel"/>
1313
</php>
1414
</phpunit>

public/app.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
declare(strict_types=1);
33

4-
use PhpList\PhpList4\Core\Bootstrap;
4+
use PhpList\Core\Core\Bootstrap;
55

66
require dirname(__DIR__) . '/vendor/autoload.php';
77

public/app_dev.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?php
22
declare(strict_types=1);
33

4-
use PhpList\PhpList4\Core\Bootstrap;
5-
use PhpList\PhpList4\Core\Environment;
4+
use PhpList\Core\Core\Bootstrap;
5+
use PhpList\Core\Core\Environment;
66

77
require dirname(__DIR__) . '/vendor/autoload.php';
88

public/app_test.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?php
22
declare(strict_types=1);
33

4-
use PhpList\PhpList4\Core\Bootstrap;
5-
use PhpList\PhpList4\Core\Environment;
4+
use PhpList\Core\Core\Bootstrap;
5+
use PhpList\Core\Core\Environment;
66

77
require dirname(__DIR__) . '/vendor/autoload.php';
88

src/Composer/ModuleFinder.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
declare(strict_types=1);
33

4-
namespace PhpList\PhpList4\Composer;
4+
namespace PhpList\Core\Composer;
55

66
use Symfony\Component\Yaml\Yaml;
77

src/Composer/PackageRepository.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
declare(strict_types=1);
33

4-
namespace PhpList\PhpList4\Composer;
4+
namespace PhpList\Core\Composer;
55

66
use Composer\Composer;
77
use Composer\Package\PackageInterface;

src/Composer/ScriptHandler.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?php
22
declare(strict_types=1);
33

4-
namespace PhpList\PhpList4\Composer;
4+
namespace PhpList\Core\Composer;
55

66
use Composer\Package\PackageInterface;
77
use Composer\Script\Event;
8-
use PhpList\PhpList4\Core\ApplicationStructure;
8+
use PhpList\Core\Core\ApplicationStructure;
99
use Sensio\Bundle\DistributionBundle\Composer\ScriptHandler as SensioScriptHandler;
1010
use Symfony\Component\Filesystem\Filesystem;
1111

src/Core/ApplicationKernel.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
declare(strict_types=1);
33

4-
namespace PhpList\PhpList4\Core;
4+
namespace PhpList\Core\Core;
55

66
use Symfony\Bundle\WebServerBundle\WebServerBundle;
77
use Symfony\Component\Config\Loader\LoaderInterface;

src/Core/ApplicationStructure.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
declare(strict_types=1);
33

4-
namespace PhpList\PhpList4\Core;
4+
namespace PhpList\Core\Core;
55

66
/**
77
* This class provides information about the current application and its file structure.
@@ -38,7 +38,7 @@ public function getCorePackageRoot(): string
3838
public function getApplicationRoot(): string
3939
{
4040
$corePackagePath = $this->getCorePackageRoot();
41-
$corePackageIsRootPackage = interface_exists('PhpList\\PhpList4\\Tests\\Support\\Interfaces\\TestMarker');
41+
$corePackageIsRootPackage = interface_exists('PhpList\\Core\\Tests\\Support\\Interfaces\\TestMarker');
4242
if ($corePackageIsRootPackage) {
4343
$applicationRoot = $corePackagePath;
4444
} else {

src/Core/Bootstrap.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
declare(strict_types=1);
33

4-
namespace PhpList\PhpList4\Core;
4+
namespace PhpList\Core\Core;
55

66
use Doctrine\ORM\EntityManagerInterface;
77
use Symfony\Component\Debug\Debug;

src/Core/Environment.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
declare(strict_types=1);
33

4-
namespace PhpList\PhpList4\Core;
4+
namespace PhpList\Core\Core;
55

66
/**
77
* This class provides methods and constants for the application environment/context.

src/Domain/Model/Identity/Administrator.php

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
<?php
22
declare(strict_types=1);
33

4-
namespace PhpList\PhpList4\Domain\Model\Identity;
4+
namespace PhpList\Core\Domain\Model\Identity;
55

66
use Doctrine\ORM\Mapping;
77
use Doctrine\ORM\Mapping\Column;
8-
use PhpList\PhpList4\Domain\Model\Interfaces\CreationDate;
9-
use PhpList\PhpList4\Domain\Model\Interfaces\DomainModel;
10-
use PhpList\PhpList4\Domain\Model\Interfaces\Identity;
11-
use PhpList\PhpList4\Domain\Model\Interfaces\ModificationDate;
12-
use PhpList\PhpList4\Domain\Model\Traits\CreationDateTrait;
13-
use PhpList\PhpList4\Domain\Model\Traits\IdentityTrait;
14-
use PhpList\PhpList4\Domain\Model\Traits\ModificationDateTrait;
8+
use PhpList\Core\Domain\Model\Interfaces\CreationDate;
9+
use PhpList\Core\Domain\Model\Interfaces\DomainModel;
10+
use PhpList\Core\Domain\Model\Interfaces\Identity;
11+
use PhpList\Core\Domain\Model\Interfaces\ModificationDate;
12+
use PhpList\Core\Domain\Model\Traits\CreationDateTrait;
13+
use PhpList\Core\Domain\Model\Traits\IdentityTrait;
14+
use PhpList\Core\Domain\Model\Traits\ModificationDateTrait;
1515

1616
/**
1717
* This class represents an administrator who can log to the system, is allowed to administer
1818
* selected lists (as the owner), send campaigns to these lists and edit subscribers.
1919
*
20-
* @Mapping\Entity(repositoryClass="PhpList\PhpList4\Domain\Repository\Identity\AdministratorRepository")
20+
* @Mapping\Entity(repositoryClass="PhpList\Core\Domain\Repository\Identity\AdministratorRepository")
2121
* @Mapping\Table(name="phplist_admin")
2222
* @Mapping\HasLifecycleCallbacks
2323
*

src/Domain/Model/Identity/AdministratorToken.php

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
<?php
22
declare(strict_types=1);
33

4-
namespace PhpList\PhpList4\Domain\Model\Identity;
4+
namespace PhpList\Core\Domain\Model\Identity;
55

66
use Doctrine\ORM\Mapping;
77
use Doctrine\ORM\Mapping\Column;
88
use Doctrine\ORM\Proxy\Proxy;
99
use JMS\Serializer\Annotation\ExclusionPolicy;
1010
use JMS\Serializer\Annotation\Expose;
11-
use PhpList\PhpList4\Domain\Model\Interfaces\CreationDate;
12-
use PhpList\PhpList4\Domain\Model\Interfaces\DomainModel;
13-
use PhpList\PhpList4\Domain\Model\Interfaces\Identity;
14-
use PhpList\PhpList4\Domain\Model\Traits\IdentityTrait;
11+
use PhpList\Core\Domain\Model\Interfaces\CreationDate;
12+
use PhpList\Core\Domain\Model\Interfaces\DomainModel;
13+
use PhpList\Core\Domain\Model\Interfaces\Identity;
14+
use PhpList\Core\Domain\Model\Traits\IdentityTrait;
1515

1616
/**
1717
* This class represents an API authentication token for an administrator.
1818
*
19-
* @Mapping\Entity(repositoryClass="PhpList\PhpList4\Domain\Repository\Identity\AdministratorTokenRepository")
19+
* @Mapping\Entity(repositoryClass="PhpList\Core\Domain\Repository\Identity\AdministratorTokenRepository")
2020
* @Mapping\Table(name="phplist_admintoken")
2121
* @ExclusionPolicy("all")
2222
*
@@ -53,7 +53,7 @@ class AdministratorToken implements DomainModel, Identity, CreationDate
5353

5454
/**
5555
* @var Administrator|Proxy
56-
* @Mapping\ManyToOne(targetEntity="PhpList\PhpList4\Domain\Model\Identity\Administrator")
56+
* @Mapping\ManyToOne(targetEntity="PhpList\Core\Domain\Model\Identity\Administrator")
5757
* @Mapping\JoinColumn(name="adminid")
5858
*/
5959
private $administrator = null;

src/Domain/Model/Interfaces/CreationDate.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
declare(strict_types=1);
33

4-
namespace PhpList\PhpList4\Domain\Model\Interfaces;
4+
namespace PhpList\Core\Domain\Model\Interfaces;
55

66
use Doctrine\ORM\Mapping\PrePersist;
77

src/Domain/Model/Interfaces/DomainModel.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
declare(strict_types=1);
33

4-
namespace PhpList\PhpList4\Domain\Model\Interfaces;
4+
namespace PhpList\Core\Domain\Model\Interfaces;
55

66
/**
77
* This is the interface all domain models (entities) should implement.

src/Domain/Model/Interfaces/Identity.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
declare(strict_types=1);
33

4-
namespace PhpList\PhpList4\Domain\Model\Interfaces;
4+
namespace PhpList\Core\Domain\Model\Interfaces;
55

66
/**
77
* This interface communicates that a domain model has an ID property.

src/Domain/Model/Interfaces/ModificationDate.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
declare(strict_types=1);
33

4-
namespace PhpList\PhpList4\Domain\Model\Interfaces;
4+
namespace PhpList\Core\Domain\Model\Interfaces;
55

66
use Doctrine\ORM\Mapping;
77

0 commit comments

Comments
 (0)