Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions bin/console
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use PhpList\Core\Core\Bootstrap;
use PhpList\Core\Core\Environment;
use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\Debug\Debug;
use Symfony\Component\ErrorHandler\ErrorHandler;

set_time_limit(0);

Expand All @@ -19,7 +19,7 @@ $debug = getenv('SYMFONY_DEBUG') !== '0' && !$input->hasParameterOption(['--no-d
&& $environment !== Environment::PRODUCTION;

if ($debug) {
Debug::enable();
ErrorHandler::register();
}

Bootstrap::getInstance()->setEnvironment($environment)->configure();
Expand Down
57 changes: 28 additions & 29 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,35 +34,35 @@
"source": "https://github.com/phpList/core"
},
"require": {
"php": "^7.2|^8.0",
"doctrine/orm": "^2.5.0",
"doctrine/common": "^2.6.0",
"doctrine/doctrine-bundle": "^1.8.0",
"symfony/symfony": "^3.4.37",
"symfony/monolog-bundle": "^3.1.0",
"symfony/dependency-injection": "^3.4.37",
"symfony/config": "^3.4.37",
"symfony/yaml": "^3.4.37",
"jms/serializer-bundle": "^3.8.0",
"sensio/framework-extra-bundle": "^5.1.0",
"sensio/distribution-bundle": "^5.0.6"
"php": "^8.1",
"symfony/dependency-injection": "^6.4",
"symfony/config": "^6.4",
"symfony/yaml": "^6.4",
"symfony/error-handler": "^6.4",
"symfony/serializer": "^6.4",
"symfony/monolog-bundle": "^3.10",
"symfony/serializer-pack": "^1.3",
"symfony/orm-pack": "^2.4",
"symfony/asset": "^6.4",
"symfony/security-csrf": "^6.4",
"symfony/form": "^6.4",
"symfony/validator": "^6.4",
"doctrine/doctrine-fixtures-bundle": "^3.7",
"doctrine/instantiator": "^2.0"
},
"require-dev": {
"phpunit/phpunit": "^6.5.6",
"phpunit/phpunit-mock-objects": "^5.0.6",
"phpunit/dbunit": "^3.0.0",
"phpunit/phpunit": "^9.5",
"guzzlehttp/guzzle": "^6.3.0",
"squizlabs/php_codesniffer": "^3.2.0",
"phpstan/phpstan": "^0.7.0|0.12.57",
"nette/caching": "^2.5.0|^3.0.0",
"nikic/php-parser": "^3.1.0",
"phpstan/phpstan": "^0.12.57",
"nette/caching": "^3.0.0",
"nikic/php-parser": "^4.19.1",
"phpmd/phpmd": "^2.6.0",
"composer/composer": "^1.6.0",
"doctrine/instantiator": "^1.0.5"
"symfony/test-pack": "^1.1"
},
"suggest": {
"phplist/web-frontend": "4.0.x-dev",
"phplist/rest-api": "4.0.x-dev"
"phplist/web-frontend": "5.0.x-dev",
"phplist/rest-api": "5.0.x-dev"
},
"autoload": {
"psr-4": {
Expand All @@ -83,7 +83,8 @@
"PhpList\\Core\\Composer\\ScriptHandler::createBundleConfiguration",
"PhpList\\Core\\Composer\\ScriptHandler::createRoutesConfiguration",
"PhpList\\Core\\Composer\\ScriptHandler::createParametersConfiguration",
"PhpList\\Core\\Composer\\ScriptHandler::clearAllCaches"
"php bin/console cache:clear",
"php bin/console cache:warmup"
],
"post-install-cmd": [
"@update-configuration"
Expand All @@ -97,7 +98,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "4.0.x-dev"
"dev-ISSUE-337": "v5.0.x-dev"
},
"symfony-app-dir": "",
"symfony-bin-dir": "bin",
Expand All @@ -107,16 +108,14 @@
"phplist/core": {
"bundles": [
"Symfony\\Bundle\\FrameworkBundle\\FrameworkBundle",
"Sensio\\Bundle\\FrameworkExtraBundle\\SensioFrameworkExtraBundle",
"Symfony\\Bundle\\MonologBundle\\MonologBundle",
"JMS\\SerializerBundle\\JMSSerializerBundle",
"Doctrine\\Bundle\\DoctrineBundle\\DoctrineBundle",
"PhpList\\Core\\EmptyStartPageBundle\\PhpListEmptyStartPageBundle"
"PhpList\\Core\\EmptyStartPageBundle\\EmptyStartPageBundle"
],
"routes": {
"homepage": {
"resource": "@PhpListEmptyStartPageBundle/Controller/",
"type": "annotation"
"resource": "@EmptyStartPageBundle/Controller/",
"type": "attribute"
}
}
}
Expand Down
16 changes: 13 additions & 3 deletions config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,29 @@ framework:
strict_requirements: ~
form: ~
csrf_protection: ~
validation: { enable_annotations: true }
validation:
enable_attributes: true
email_validation_mode: html5
#serializer: { enable_annotations: true }
#templating:
#engines: ['twig']
default_locale: '%locale%'
trusted_hosts: ~
handle_all_throwables: true
session:
# https://symfony.com/doc/current/reference/configuration/framework.html#handler-id
handler_id: session.handler.native_file
save_path: '%kernel.application_dir%/var/sessions/%kernel.environment%'
cookie_secure: auto
cookie_samesite: lax
fragments: ~
http_method_override: true
assets: ~
php_errors:
log: true
serializer:
enabled: true
enable_attributes: true

# Doctrine Configuration
doctrine:
Expand All @@ -52,7 +60,9 @@ doctrine:
auto_mapping: true
mappings:
PhpList\Core\Domain\Model:
type: annotation
is_bundle: false
prefix: PhpList\Core\Domain\Model
type: attribute
dir: '%kernel.project_dir%/src/Domain/Model/'
prefix: 'PhpList\Core\Domain\Model\'
controller_resolver:
auto_mapping: true
13 changes: 12 additions & 1 deletion config/config_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ imports:
framework:
test: ~
session:
storage_id: session.storage.mock_file
cookie_domain: session.storage.mock_file
handler_id: null
profiler:
collect: false

doctrine:
dbal:
driver: 'pdo_sqlite'
memory: true
charset: UTF8
# orm:
# entity_managers:
# default:
# report_fields_where_declared: true
8 changes: 4 additions & 4 deletions config/parameters.yml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ parameters:
database_host: '%%env(PHPLIST_DATABASE_HOST)%%'
env(PHPLIST_DATABASE_HOST): '127.0.0.1'
database_port: '%%env(PHPLIST_DATABASE_PORT)%%'
env(PHPLIST_DATABASE_PORT): null
env(PHPLIST_DATABASE_PORT): '3306'
database_name: '%%env(PHPLIST_DATABASE_NAME)%%'
env(PHPLIST_DATABASE_NAME): 'phplist'
env(PHPLIST_DATABASE_NAME): 'phplistdb'
database_user: '%%env(PHPLIST_DATABASE_USER)%%'
env(PHPLIST_DATABASE_USER): 'foo'
env(PHPLIST_DATABASE_USER): 'phplist'
database_password: '%%env(PHPLIST_DATABASE_PASSWORD)%%'
env(PHPLIST_DATABASE_PASSWORD): 'correct horse battery staple'
env(PHPLIST_DATABASE_PASSWORD): 'phplist'

# A secret key that's used to generate certain security-related tokens
secret: '%%env(PHPLIST_SECRET)%%'
Expand Down
2 changes: 2 additions & 0 deletions config/repositories.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ services:
parent: PhpList\Core\Domain\Repository
arguments:
- PhpList\Core\Domain\Model\Identity\Administrator
- Doctrine\ORM\Mapping\ClassMetadata\ClassMetadata
- PhpList\Core\Security\HashGenerator

PhpList\Core\Domain\Repository\Identity\AdministratorTokenRepository:
parent: PhpList\Core\Domain\Repository
Expand Down
15 changes: 14 additions & 1 deletion config/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,24 @@ services:
autowire: true
autoconfigure: false
public: true
factory: Doctrine\ORM\EntityManagerInterface:getRepository
factory: ['@doctrine.orm.entity_manager', getRepository]

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

doctrine.orm.metadata.annotation_reader:
alias: doctrine.annotation_reader

doctrine.annotation_reader:
class: Doctrine\Common\Annotations\AnnotationReader
autowire: true

doctrine.orm.default_annotation_metadata_driver:
class: Doctrine\ORM\Mapping\Driver\AnnotationDriver
arguments:
- '@annotation_reader'
- '%kernel.project_dir%/src/Domain/Model/'
2 changes: 1 addition & 1 deletion phpdoc.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
<output>docs/phpdocumentor</output>
</paths>

</phpdocumentor>
</phpdocumentor>
2 changes: 1 addition & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<!-- https://phpunit.de/manual/current/en/appendixes.configuration.html -->
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/6.2/phpunit.xsd"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/9.5/phpunit.xsd"
backupGlobals="false"
colors="true"
bootstrap="vendor/autoload.php"
Expand Down
1 change: 1 addition & 0 deletions public/app_test.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types=1);

use PhpList\Core\Core\Bootstrap;
Expand Down
Loading
Loading