Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[full-ci] Adjust symfony deprecated #40521

Merged
merged 4 commits into from
Jan 10, 2023
Merged
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: 4 additions & 0 deletions changelog/unreleased/PHPdependencies20220920onwardSymfony
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,7 @@ https://symfony.com/blog/symfony-4-4-48-released
https://github.com/owncloud/core/pull/40448
https://symfony.com/blog/symfony-4-4-49-released
https://github.com/owncloud/core/pull/40517

Code that has been deprecated in Symfony 4 has been refactored to be ready for Symfony 5.

https://github.com/owncloud/core/pull/40521
6 changes: 4 additions & 2 deletions lib/private/L10N/L10N.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@
use OCP\IL10N;
use OCP\L10N\IFactory;
use Punic\Calendar;
use Symfony\Component\Translation\PluralizationRules;
use Symfony\Contracts\Translation\TranslatorTrait;

class L10N implements IL10N {
use TranslatorTrait;

/** @var IFactory */
protected $factory;

Expand Down Expand Up @@ -200,6 +202,6 @@ protected function load($translationFile) {
* @return int
*/
public function computePlural($number) {
return PluralizationRules::get($number, $this->lang);
return $this->getPluralizationRule($number, $this->lang);
}
}
2 changes: 1 addition & 1 deletion lib/public/App/ManagerEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

namespace OCP\App;

use Symfony\Component\EventDispatcher\Event;
use Symfony\Contracts\EventDispatcher\Event;

/**
* Class ManagerEvent
Expand Down
2 changes: 1 addition & 1 deletion lib/public/Comments/CommentsEntityEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

namespace OCP\Comments;

use Symfony\Component\EventDispatcher\Event;
use Symfony\Contracts\EventDispatcher\Event;

/**
* Class CommentsEntityEvent
Expand Down
2 changes: 1 addition & 1 deletion lib/public/Comments/CommentsEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

namespace OCP\Comments;

use Symfony\Component\EventDispatcher\Event;
use Symfony\Contracts\EventDispatcher\Event;

/**
* Class CommentsEvent
Expand Down
2 changes: 1 addition & 1 deletion lib/public/Console/ConsoleEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

namespace OCP\Console;

use Symfony\Component\EventDispatcher\Event;
use Symfony\Contracts\EventDispatcher\Event;

/**
* Class ConsoleEvent
Expand Down
4 changes: 2 additions & 2 deletions lib/public/Notification/Events/RegisterConsumerEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

namespace OCP\Notification\Events;

use Symfony\Component\EventDispatcher\Event;
use Symfony\Contracts\EventDispatcher\Event;
use OCP\Notification\IApp;

/**
Expand Down Expand Up @@ -51,7 +51,7 @@ abstract class RegisterConsumerEvent extends Event {
*
* @since 10.0.8
*/
public function stopPropagation() {
public function stopPropagation(): void {
}

/**
Expand Down
4 changes: 2 additions & 2 deletions lib/public/Notification/Events/RegisterNotifierEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

namespace OCP\Notification\Events;

use Symfony\Component\EventDispatcher\Event;
use Symfony\Contracts\EventDispatcher\Event;
use OCP\Notification\INotifier;

/**
Expand Down Expand Up @@ -55,7 +55,7 @@ abstract class RegisterNotifierEvent extends Event {
*
* @since 10.0.8
*/
public function stopPropagation() {
public function stopPropagation(): void {
}

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/public/Roles/AddRolesEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

namespace OCP\Roles;

use Symfony\Component\EventDispatcher\Event;
use Symfony\Contracts\EventDispatcher\Event;

/**
* Class AddRolesEvent
Expand Down
2 changes: 1 addition & 1 deletion lib/public/SabrePluginEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

use OCP\AppFramework\Http;
use Sabre\DAV\Server;
use Symfony\Component\EventDispatcher\Event;
use Symfony\Contracts\EventDispatcher\Event;

/**
* @since 8.2.0
Expand Down
2 changes: 1 addition & 1 deletion lib/public/Share/Events/ShareEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

namespace OCP\Share\Events;

use Symfony\Component\EventDispatcher\Event;
use Symfony\Contracts\EventDispatcher\Event;

/**
* Class ShareEvent
Expand Down
2 changes: 1 addition & 1 deletion lib/public/SystemTag/ManagerEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

namespace OCP\SystemTag;

use Symfony\Component\EventDispatcher\Event;
use Symfony\Contracts\EventDispatcher\Event;

/**
* Class ManagerEvent
Expand Down
2 changes: 1 addition & 1 deletion lib/public/SystemTag/MapperEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

namespace OCP\SystemTag;

use Symfony\Component\EventDispatcher\Event;
use Symfony\Contracts\EventDispatcher\Event;

/**
* Class MapperEvent
Expand Down
2 changes: 1 addition & 1 deletion lib/public/User/UserExtendedAttributesEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
namespace OCP\User;

use OCP\IUser;
use Symfony\Component\EventDispatcher\Event;
use Symfony\Contracts\EventDispatcher\Event;

/**
* Class UserExtendedAttributesEvent
Expand Down