From c2bcc6bc469c46beed042d0859ec14b1060935b4 Mon Sep 17 00:00:00 2001 From: Marko Cupic Date: Wed, 4 Jan 2023 11:14:46 +0100 Subject: [PATCH] Fix Contao requirement issue --- composer.json | 58 +++++++++---------- config/services.yaml | 11 ++++ contao/dca/tl_calendar_events_member.php | 10 ++-- src/ContaoManager/Plugin.php | 2 +- ...entBookingEventBookingModuleController.php | 2 +- ...EventBookingMemberListModuleController.php | 2 +- ...ngUnsubscribeFromEventModuleController.php | 2 +- src/DataContainer/CalendarEvents.php | 2 +- src/DataContainer/CalendarEventsMember.php | 2 +- src/DataContainer/Module.php | 2 +- ...arkocupicCalendarEventBookingExtension.php | 4 +- .../ContentOnLoadCallbackListener.php | 12 ++++ src/Helper/AddTemplateData.php | 2 +- src/Helper/EventRegistration.php | 2 +- src/Helper/Formatter.php | 2 +- src/Helper/NotificationHelper.php | 2 +- src/Listener/ContaoHooks/AddField/Escort.php | 2 +- src/Listener/ContaoHooks/ExportTable.php | 2 +- src/Listener/ContaoHooks/LoadFormField.php | 2 +- src/Listener/ContaoHooks/ParseTemplate.php | 2 +- .../ContaoHooks/PostBooking/AddToSession.php | 2 +- .../ContaoHooks/PostBooking/ContaoLog.php | 2 +- .../ContaoHooks/PostBooking/Notification.php | 2 +- .../PrepareFormData/FormatInput.php | 2 +- .../ValidateEmailAddress.php | 2 +- .../ValidateEscorts.php | 2 +- .../ValidateNumberOfParticipants.php | 2 +- src/Logger/Logger.php | 2 +- src/MarkocupicCalendarEventBookingBundle.php | 2 +- src/Migration/AutogenerateBookingForm.php | 2 +- .../Version500/AutoGenerateBookingToken.php | 2 +- .../Version500/RenameFrontendModuleType.php | 2 +- src/Model/CalendarEventsMemberModel.php | 2 +- 33 files changed, 86 insertions(+), 65 deletions(-) create mode 100644 config/services.yaml diff --git a/composer.json b/composer.json index a710ce0..ad9380b 100644 --- a/composer.json +++ b/composer.json @@ -1,32 +1,32 @@ { - "name": "markocupic/calendar-event-booking-bundle", - "type": "contao-bundle", - "description": "Contao 4 Calendar Event Booking Bundle", - "license": "MIT", - "authors": [ - { - "name": "Marko Cupic", - "homepage": "https://github.com/markocupic" + "name": "markocupic/calendar-event-booking-bundle", + "type": "contao-bundle", + "description": "Contao 4 Calendar Event Booking Bundle", + "license": "MIT", + "authors": [ + { + "name": "Marko Cupic", + "homepage": "https://github.com/markocupic" + } + ], + "require": { + "php": "^7.4 || ^8.0", + "contao/core-bundle": "^4.9", + "contao/calendar-bundle": "^4.9", + "markocupic/export_table": "^5.1", + "ramsey/uuid": "^3.0 || ^4.0", + "codefog/contao-haste": "^4.23", + "terminal42/notification_center": "^1.5" + }, + "require-dev": { + "contao/easy-coding-standard": "^3.0" + }, + "autoload": { + "psr-4": { + "Markocupic\\CalendarEventBookingBundle\\": "src/" + } + }, + "extra": { + "contao-manager-plugin": "Markocupic\\CalendarEventBookingBundle\\ContaoManager\\Plugin" } - ], - "require": { - "php": "^7.4 || ^8.0", - "contao/core-bundle": "^4.13", - "contao/calendar-bundle": "^4.9", - "markocupic/export_table": "^5.1", - "ramsey/uuid": "^3.0 || ^4.0", - "codefog/contao-haste": "^4.23", - "terminal42/notification_center": "^1.5" - }, - "require-dev": { - "contao/easy-coding-standard": "^3.0" - }, - "autoload": { - "psr-4": { - "Markocupic\\CalendarEventBookingBundle\\": "src/" - } - }, - "extra": { - "contao-manager-plugin": "Markocupic\\CalendarEventBookingBundle\\ContaoManager\\Plugin" - } } diff --git a/config/services.yaml b/config/services.yaml new file mode 100644 index 0000000..5b5e325 --- /dev/null +++ b/config/services.yaml @@ -0,0 +1,11 @@ +services: + _defaults: + autowire: true + autoconfigure: true + public: true + bind: + $projectDir: '%kernel.project_dir%' + + Markocupic\CalendarEventBookingBundle\: + resource: ../src/ + exclude: ../src/{Event,Model,DependencyInjection} diff --git a/contao/dca/tl_calendar_events_member.php b/contao/dca/tl_calendar_events_member.php index 9684614..4b97394 100644 --- a/contao/dca/tl_calendar_events_member.php +++ b/contao/dca/tl_calendar_events_member.php @@ -12,15 +12,13 @@ * @link https://github.com/markocupic/calendar-event-booking-bundle */ -use Contao\DataContainer; -use Contao\DC_Table; use Markocupic\CalendarEventBookingBundle\DataContainer\CalendarEventsMember; use Ramsey\Uuid\Uuid; $GLOBALS['TL_DCA']['tl_calendar_events_member'] = [ // Config 'config' => [ - 'dataContainer' => DC_Table::class, + 'dataContainer' => 'Table', 'ptable' => 'tl_calendar_events', 'enableVersioning' => true, 'onsubmit_callback' => [], @@ -42,9 +40,9 @@ // List 'list' => [ 'sorting' => [ - 'mode' => DataContainer::MODE_SORTABLE, + 'mode' => '2', 'fields' => ['lastname'], - 'flag' => DataContainer::SORT_INITIAL_LETTER_ASC, + 'flag' => '1', 'panelLayout' => 'filter;sort,search', ], 'label' => [ @@ -57,7 +55,7 @@ 'showColumns' => true, ], 'global_operations' => [ - 'all' => [ + 'all' => [ 'label' => &$GLOBALS['TL_LANG']['MSC']['all'], 'href' => 'act=select', 'class' => 'header_edit_all', diff --git a/src/ContaoManager/Plugin.php b/src/ContaoManager/Plugin.php index d85d422..e775621 100644 --- a/src/ContaoManager/Plugin.php +++ b/src/ContaoManager/Plugin.php @@ -5,7 +5,7 @@ /* * This file is part of Calendar Event Booking Bundle. * - * (c) Marko Cupic 2022 + * (c) Marko Cupic 2023 * @license MIT * For the full copyright and license information, * please view the LICENSE file that was distributed with this source code. diff --git a/src/Controller/FrontendModule/CalendarEventBookingEventBookingModuleController.php b/src/Controller/FrontendModule/CalendarEventBookingEventBookingModuleController.php index 1802ecf..649951d 100644 --- a/src/Controller/FrontendModule/CalendarEventBookingEventBookingModuleController.php +++ b/src/Controller/FrontendModule/CalendarEventBookingEventBookingModuleController.php @@ -5,7 +5,7 @@ /* * This file is part of Calendar Event Booking Bundle. * - * (c) Marko Cupic 2022 + * (c) Marko Cupic 2023 * @license MIT * For the full copyright and license information, * please view the LICENSE file that was distributed with this source code. diff --git a/src/Controller/FrontendModule/CalendarEventBookingMemberListModuleController.php b/src/Controller/FrontendModule/CalendarEventBookingMemberListModuleController.php index 752f4e7..f844fbc 100644 --- a/src/Controller/FrontendModule/CalendarEventBookingMemberListModuleController.php +++ b/src/Controller/FrontendModule/CalendarEventBookingMemberListModuleController.php @@ -5,7 +5,7 @@ /* * This file is part of Calendar Event Booking Bundle. * - * (c) Marko Cupic 2022 + * (c) Marko Cupic 2023 * @license MIT * For the full copyright and license information, * please view the LICENSE file that was distributed with this source code. diff --git a/src/Controller/FrontendModule/CalendarEventBookingUnsubscribeFromEventModuleController.php b/src/Controller/FrontendModule/CalendarEventBookingUnsubscribeFromEventModuleController.php index 8e450cd..5395915 100644 --- a/src/Controller/FrontendModule/CalendarEventBookingUnsubscribeFromEventModuleController.php +++ b/src/Controller/FrontendModule/CalendarEventBookingUnsubscribeFromEventModuleController.php @@ -5,7 +5,7 @@ /* * This file is part of Calendar Event Booking Bundle. * - * (c) Marko Cupic 2022 + * (c) Marko Cupic 2023 * @license MIT * For the full copyright and license information, * please view the LICENSE file that was distributed with this source code. diff --git a/src/DataContainer/CalendarEvents.php b/src/DataContainer/CalendarEvents.php index 34b9e92..add1c7c 100644 --- a/src/DataContainer/CalendarEvents.php +++ b/src/DataContainer/CalendarEvents.php @@ -5,7 +5,7 @@ /* * This file is part of Calendar Event Booking Bundle. * - * (c) Marko Cupic 2022 + * (c) Marko Cupic 2023 * @license MIT * For the full copyright and license information, * please view the LICENSE file that was distributed with this source code. diff --git a/src/DataContainer/CalendarEventsMember.php b/src/DataContainer/CalendarEventsMember.php index 55c2ff2..8590677 100644 --- a/src/DataContainer/CalendarEventsMember.php +++ b/src/DataContainer/CalendarEventsMember.php @@ -5,7 +5,7 @@ /* * This file is part of Calendar Event Booking Bundle. * - * (c) Marko Cupic 2022 + * (c) Marko Cupic 2023 * @license MIT * For the full copyright and license information, * please view the LICENSE file that was distributed with this source code. diff --git a/src/DataContainer/Module.php b/src/DataContainer/Module.php index b0bb2c7..53158e5 100644 --- a/src/DataContainer/Module.php +++ b/src/DataContainer/Module.php @@ -5,7 +5,7 @@ /* * This file is part of Calendar Event Booking Bundle. * - * (c) Marko Cupic 2022 + * (c) Marko Cupic 2023 * @license MIT * For the full copyright and license information, * please view the LICENSE file that was distributed with this source code. diff --git a/src/DependencyInjection/MarkocupicCalendarEventBookingExtension.php b/src/DependencyInjection/MarkocupicCalendarEventBookingExtension.php index 4a0be66..0f378d9 100644 --- a/src/DependencyInjection/MarkocupicCalendarEventBookingExtension.php +++ b/src/DependencyInjection/MarkocupicCalendarEventBookingExtension.php @@ -5,7 +5,7 @@ /* * This file is part of Calendar Event Booking Bundle. * - * (c) Marko Cupic 2022 + * (c) Marko Cupic 2023 * @license MIT * For the full copyright and license information, * please view the LICENSE file that was distributed with this source code. @@ -31,6 +31,6 @@ public function load(array $mergedConfig, ContainerBuilder $container): void new FileLocator(__DIR__.'/../../config') ); - $loader->load('services.yml'); + $loader->load('services.yaml'); } } diff --git a/src/EventListener/DataContainer/ContentOnLoadCallbackListener.php b/src/EventListener/DataContainer/ContentOnLoadCallbackListener.php index 7714d03..9a32d96 100644 --- a/src/EventListener/DataContainer/ContentOnLoadCallbackListener.php +++ b/src/EventListener/DataContainer/ContentOnLoadCallbackListener.php @@ -1,5 +1,17 @@ + * @license MIT + * For the full copyright and license information, + * please view the LICENSE file that was distributed with this source code. + * @link https://github.com/markocupic/calendar-event-booking-bundle + */ + namespace Markocupic\CalendarEventBookingBundle\EventListener\DataContainer; use Contao\CoreBundle\ServiceAnnotation\Callback; diff --git a/src/Helper/AddTemplateData.php b/src/Helper/AddTemplateData.php index 36686f9..ff387cd 100644 --- a/src/Helper/AddTemplateData.php +++ b/src/Helper/AddTemplateData.php @@ -5,7 +5,7 @@ /* * This file is part of Calendar Event Booking Bundle. * - * (c) Marko Cupic 2022 + * (c) Marko Cupic 2023 * @license MIT * For the full copyright and license information, * please view the LICENSE file that was distributed with this source code. diff --git a/src/Helper/EventRegistration.php b/src/Helper/EventRegistration.php index 172e5f8..360a455 100644 --- a/src/Helper/EventRegistration.php +++ b/src/Helper/EventRegistration.php @@ -5,7 +5,7 @@ /* * This file is part of Calendar Event Booking Bundle. * - * (c) Marko Cupic 2022 + * (c) Marko Cupic 2023 * @license MIT * For the full copyright and license information, * please view the LICENSE file that was distributed with this source code. diff --git a/src/Helper/Formatter.php b/src/Helper/Formatter.php index b623aa2..c1fd5eb 100644 --- a/src/Helper/Formatter.php +++ b/src/Helper/Formatter.php @@ -5,7 +5,7 @@ /* * This file is part of Calendar Event Booking Bundle. * - * (c) Marko Cupic 2022 + * (c) Marko Cupic 2023 * @license MIT * For the full copyright and license information, * please view the LICENSE file that was distributed with this source code. diff --git a/src/Helper/NotificationHelper.php b/src/Helper/NotificationHelper.php index 96df79c..df1ece2 100644 --- a/src/Helper/NotificationHelper.php +++ b/src/Helper/NotificationHelper.php @@ -5,7 +5,7 @@ /* * This file is part of Calendar Event Booking Bundle. * - * (c) Marko Cupic 2022 + * (c) Marko Cupic 2023 * @license MIT * For the full copyright and license information, * please view the LICENSE file that was distributed with this source code. diff --git a/src/Listener/ContaoHooks/AddField/Escort.php b/src/Listener/ContaoHooks/AddField/Escort.php index 1780da5..a3272d1 100644 --- a/src/Listener/ContaoHooks/AddField/Escort.php +++ b/src/Listener/ContaoHooks/AddField/Escort.php @@ -5,7 +5,7 @@ /* * This file is part of Calendar Event Booking Bundle. * - * (c) Marko Cupic 2022 + * (c) Marko Cupic 2023 * @license MIT * For the full copyright and license information, * please view the LICENSE file that was distributed with this source code. diff --git a/src/Listener/ContaoHooks/ExportTable.php b/src/Listener/ContaoHooks/ExportTable.php index 37646f6..deed666 100644 --- a/src/Listener/ContaoHooks/ExportTable.php +++ b/src/Listener/ContaoHooks/ExportTable.php @@ -5,7 +5,7 @@ /* * This file is part of Calendar Event Booking Bundle. * - * (c) Marko Cupic 2022 + * (c) Marko Cupic 2023 * @license MIT * For the full copyright and license information, * please view the LICENSE file that was distributed with this source code. diff --git a/src/Listener/ContaoHooks/LoadFormField.php b/src/Listener/ContaoHooks/LoadFormField.php index 4d693cb..8991e09 100644 --- a/src/Listener/ContaoHooks/LoadFormField.php +++ b/src/Listener/ContaoHooks/LoadFormField.php @@ -5,7 +5,7 @@ /* * This file is part of Calendar Event Booking Bundle. * - * (c) Marko Cupic 2022 + * (c) Marko Cupic 2023 * @license MIT * For the full copyright and license information, * please view the LICENSE file that was distributed with this source code. diff --git a/src/Listener/ContaoHooks/ParseTemplate.php b/src/Listener/ContaoHooks/ParseTemplate.php index da85000..973b874 100644 --- a/src/Listener/ContaoHooks/ParseTemplate.php +++ b/src/Listener/ContaoHooks/ParseTemplate.php @@ -5,7 +5,7 @@ /* * This file is part of Calendar Event Booking Bundle. * - * (c) Marko Cupic 2022 + * (c) Marko Cupic 2023 * @license MIT * For the full copyright and license information, * please view the LICENSE file that was distributed with this source code. diff --git a/src/Listener/ContaoHooks/PostBooking/AddToSession.php b/src/Listener/ContaoHooks/PostBooking/AddToSession.php index 79227ec..4af8dea 100644 --- a/src/Listener/ContaoHooks/PostBooking/AddToSession.php +++ b/src/Listener/ContaoHooks/PostBooking/AddToSession.php @@ -5,7 +5,7 @@ /* * This file is part of Calendar Event Booking Bundle. * - * (c) Marko Cupic 2022 + * (c) Marko Cupic 2023 * @license MIT * For the full copyright and license information, * please view the LICENSE file that was distributed with this source code. diff --git a/src/Listener/ContaoHooks/PostBooking/ContaoLog.php b/src/Listener/ContaoHooks/PostBooking/ContaoLog.php index b34b596..90b6fea 100644 --- a/src/Listener/ContaoHooks/PostBooking/ContaoLog.php +++ b/src/Listener/ContaoHooks/PostBooking/ContaoLog.php @@ -5,7 +5,7 @@ /* * This file is part of Calendar Event Booking Bundle. * - * (c) Marko Cupic 2022 + * (c) Marko Cupic 2023 * @license MIT * For the full copyright and license information, * please view the LICENSE file that was distributed with this source code. diff --git a/src/Listener/ContaoHooks/PostBooking/Notification.php b/src/Listener/ContaoHooks/PostBooking/Notification.php index d9f524e..7f9eca0 100644 --- a/src/Listener/ContaoHooks/PostBooking/Notification.php +++ b/src/Listener/ContaoHooks/PostBooking/Notification.php @@ -5,7 +5,7 @@ /* * This file is part of Calendar Event Booking Bundle. * - * (c) Marko Cupic 2022 + * (c) Marko Cupic 2023 * @license MIT * For the full copyright and license information, * please view the LICENSE file that was distributed with this source code. diff --git a/src/Listener/ContaoHooks/PrepareFormData/FormatInput.php b/src/Listener/ContaoHooks/PrepareFormData/FormatInput.php index e051162..eeb556a 100644 --- a/src/Listener/ContaoHooks/PrepareFormData/FormatInput.php +++ b/src/Listener/ContaoHooks/PrepareFormData/FormatInput.php @@ -5,7 +5,7 @@ /* * This file is part of Calendar Event Booking Bundle. * - * (c) Marko Cupic 2022 + * (c) Marko Cupic 2023 * @license MIT * For the full copyright and license information, * please view the LICENSE file that was distributed with this source code. diff --git a/src/Listener/ContaoHooks/ValidateBookingRequest/ValidateEmailAddress.php b/src/Listener/ContaoHooks/ValidateBookingRequest/ValidateEmailAddress.php index f0f2753..5eab5ac 100644 --- a/src/Listener/ContaoHooks/ValidateBookingRequest/ValidateEmailAddress.php +++ b/src/Listener/ContaoHooks/ValidateBookingRequest/ValidateEmailAddress.php @@ -5,7 +5,7 @@ /* * This file is part of Calendar Event Booking Bundle. * - * (c) Marko Cupic 2022 + * (c) Marko Cupic 2023 * @license MIT * For the full copyright and license information, * please view the LICENSE file that was distributed with this source code. diff --git a/src/Listener/ContaoHooks/ValidateBookingRequest/ValidateEscorts.php b/src/Listener/ContaoHooks/ValidateBookingRequest/ValidateEscorts.php index af31094..6b694b6 100644 --- a/src/Listener/ContaoHooks/ValidateBookingRequest/ValidateEscorts.php +++ b/src/Listener/ContaoHooks/ValidateBookingRequest/ValidateEscorts.php @@ -5,7 +5,7 @@ /* * This file is part of Calendar Event Booking Bundle. * - * (c) Marko Cupic 2022 + * (c) Marko Cupic 2023 * @license MIT * For the full copyright and license information, * please view the LICENSE file that was distributed with this source code. diff --git a/src/Listener/ContaoHooks/ValidateBookingRequest/ValidateNumberOfParticipants.php b/src/Listener/ContaoHooks/ValidateBookingRequest/ValidateNumberOfParticipants.php index 5935b55..4502abc 100644 --- a/src/Listener/ContaoHooks/ValidateBookingRequest/ValidateNumberOfParticipants.php +++ b/src/Listener/ContaoHooks/ValidateBookingRequest/ValidateNumberOfParticipants.php @@ -5,7 +5,7 @@ /* * This file is part of Calendar Event Booking Bundle. * - * (c) Marko Cupic 2022 + * (c) Marko Cupic 2023 * @license MIT * For the full copyright and license information, * please view the LICENSE file that was distributed with this source code. diff --git a/src/Logger/Logger.php b/src/Logger/Logger.php index b33b5a1..bf1b224 100644 --- a/src/Logger/Logger.php +++ b/src/Logger/Logger.php @@ -5,7 +5,7 @@ /* * This file is part of Calendar Event Booking Bundle. * - * (c) Marko Cupic 2022 + * (c) Marko Cupic 2023 * @license MIT * For the full copyright and license information, * please view the LICENSE file that was distributed with this source code. diff --git a/src/MarkocupicCalendarEventBookingBundle.php b/src/MarkocupicCalendarEventBookingBundle.php index 22301c9..b6d117e 100644 --- a/src/MarkocupicCalendarEventBookingBundle.php +++ b/src/MarkocupicCalendarEventBookingBundle.php @@ -5,7 +5,7 @@ /* * This file is part of Calendar Event Booking Bundle. * - * (c) Marko Cupic 2022 + * (c) Marko Cupic 2023 * @license MIT * For the full copyright and license information, * please view the LICENSE file that was distributed with this source code. diff --git a/src/Migration/AutogenerateBookingForm.php b/src/Migration/AutogenerateBookingForm.php index 0b2f31e..bd5bdc7 100644 --- a/src/Migration/AutogenerateBookingForm.php +++ b/src/Migration/AutogenerateBookingForm.php @@ -5,7 +5,7 @@ /* * This file is part of Calendar Event Booking Bundle. * - * (c) Marko Cupic 2022 + * (c) Marko Cupic 2023 * @license MIT * For the full copyright and license information, * please view the LICENSE file that was distributed with this source code. diff --git a/src/Migration/Version500/AutoGenerateBookingToken.php b/src/Migration/Version500/AutoGenerateBookingToken.php index e559fac..a388165 100644 --- a/src/Migration/Version500/AutoGenerateBookingToken.php +++ b/src/Migration/Version500/AutoGenerateBookingToken.php @@ -5,7 +5,7 @@ /* * This file is part of Calendar Event Booking Bundle. * - * (c) Marko Cupic 2022 + * (c) Marko Cupic 2023 * @license MIT * For the full copyright and license information, * please view the LICENSE file that was distributed with this source code. diff --git a/src/Migration/Version500/RenameFrontendModuleType.php b/src/Migration/Version500/RenameFrontendModuleType.php index 4acb72f..a0b4bcf 100644 --- a/src/Migration/Version500/RenameFrontendModuleType.php +++ b/src/Migration/Version500/RenameFrontendModuleType.php @@ -5,7 +5,7 @@ /* * This file is part of Calendar Event Booking Bundle. * - * (c) Marko Cupic 2022 + * (c) Marko Cupic 2023 * @license MIT * For the full copyright and license information, * please view the LICENSE file that was distributed with this source code. diff --git a/src/Model/CalendarEventsMemberModel.php b/src/Model/CalendarEventsMemberModel.php index 781bdd0..bce8ef1 100644 --- a/src/Model/CalendarEventsMemberModel.php +++ b/src/Model/CalendarEventsMemberModel.php @@ -5,7 +5,7 @@ /* * This file is part of Calendar Event Booking Bundle. * - * (c) Marko Cupic 2022 + * (c) Marko Cupic 2023 * @license MIT * For the full copyright and license information, * please view the LICENSE file that was distributed with this source code.