Skip to content

Commit

Permalink
Upgrade to PHP 8.0, upgrade to Deployer 7
Browse files Browse the repository at this point in the history
- new deploy strategy, project is copied to application servers instead of using NFS

remp/crm#2519
  • Loading branch information
miroc committed Aug 25, 2022
1 parent 64be4fb commit ba30ef8
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"homepage": "https://remp2020.com",
"license": "MIT",
"require": {
"php": "^7.4"
"php": "^8.0"
},
"minimum-stability": "dev",
"autoload": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<script type="text/javascript">
$(function() {
registerFormCallback(function() {
var $giftSubscriptionAddressForm = $("#{$control['giftSubscriptionAddressForm']->getElementPrototype()->id|noescape}");
var $giftSubscriptionAddressForm = $("#" + {$control['giftSubscriptionAddressForm']->getElementPrototype()->id|noescape});
if (!Nette.validateForm($giftSubscriptionAddressForm[0])) {
errorCallback();
return;
Expand All @@ -34,7 +34,7 @@
complete: function() {
// this case handles scenario when Nette.validateForm said all is fine, but successHandler
// on backend could have triggered an error anyway
var giftSubscriptionFormSaved = $('#{$control["giftSubscriptionAddressForm"]["done"]->htmlId|noescape}').val() === "1";
var giftSubscriptionFormSaved = $('#' + {$control["giftSubscriptionAddressForm"]["done"]->htmlId|noescape}).val() === "1";
if (!giftSubscriptionFormSaved) {
alert({_gifts.components.gift_subscription_address.need_to_fill});
errorCallback();
Expand All @@ -49,6 +49,6 @@
</script>

<script n:if="!$presenter->isAjax()">
$("#{$control['giftSubscriptionAddressForm']->getElementPrototype()->id|noescape}").hide();
$("#" + {$control['giftSubscriptionAddressForm']->getElementPrototype()->id|noescape}).hide();
</script>
{/block}
6 changes: 3 additions & 3 deletions src/DI/GiftsModuleExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

namespace Crm\GiftsModule\DI;

use Kdyby\Translation\DI\ITranslationProvider;
use Contributte\Translation\DI\TranslationProviderInterface;
use Nette\DI\CompilerExtension;

class GiftsModuleExtension extends CompilerExtension implements ITranslationProvider
class GiftsModuleExtension extends CompilerExtension implements TranslationProviderInterface
{
private $defaults = [];

Expand All @@ -32,7 +32,7 @@ public function beforeCompile()
* Return array of directories, that contain resources for translator.
* @return string[]
*/
public function getTranslationResources()
public function getTranslationResources(): array
{
return [__DIR__ . '/../lang/'];
}
Expand Down
2 changes: 1 addition & 1 deletion src/Forms/GiftSubscriptionAddressFormFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Crm\GiftsModule\Forms;

use Contributte\Translation\Translator;
use Crm\ApplicationModule\DataProvider\DataProviderManager;
use Crm\GiftsModule\Seeders\AddressTypesSeeder;
use Crm\PaymentsModule\Repository\PaymentMetaRepository;
Expand All @@ -11,7 +12,6 @@
use Crm\UsersModule\Repository\AddressesRepository;
use Crm\UsersModule\Repository\CountriesRepository;
use Crm\UsersModule\Repository\UsersRepository;
use Kdyby\Translation\Translator;
use Nette\Application\UI\Form;
use Nette\Database\Table\ActiveRow;
use Tomaj\Form\Renderer\BootstrapRenderer;
Expand Down
2 changes: 1 addition & 1 deletion src/Tests/BaseTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Crm\GiftsModule\Tests;

use Contributte\Translation\Translator;
use Crm\ApplicationModule\Tests\DatabaseTestCase;
use Crm\GiftsModule\GiftsModule;
use Crm\PaymentsModule\Repository\PaymentGatewaysRepository;
Expand All @@ -21,7 +22,6 @@
use Crm\UsersModule\Repository\LoginAttemptsRepository;
use Crm\UsersModule\Repository\UsersRepository;
use Crm\UsersModule\Tests\TestNotificationHandler;
use Kdyby\Translation\Translator;
use League\Event\Emitter;

abstract class BaseTestCase extends DatabaseTestCase
Expand Down

0 comments on commit ba30ef8

Please sign in to comment.