Skip to content

Commit

Permalink
chore: psalm bump 5.0 (warning webmozart/path-util is abandoned)
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastien Marinier <[email protected]>
  • Loading branch information
smarinier committed Oct 25, 2024
1 parent 33f6701 commit 2b9267d
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Install dependencies
run: composer i
- name: Install dependencies
run: composer require --dev nextcloud/ocp:${{ matrix.ocp-version }} psr/container symfony/service-contracts
run: composer require --dev nextcloud/ocp:${{ matrix.ocp-version }} symfony/service-contracts
- name: Run coding standards check
run: composer run psalm

3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"nextcloud/coding-standard": "^1.0.0",
"phpstan/phpstan": "^0.12.29",
"nextcloud/ocp": "^25.0 || ^26.0 || ^27.0",
"vimeo/psalm": "^4.5"
"vimeo/psalm": "^5.0",
"psr/container": "^1.1.2"
},
"config": {
"optimize-autoloader": true,
Expand Down
4 changes: 4 additions & 0 deletions lib/Activity/MeetingListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,15 @@
use OCA\BigBlueButton\Event\MeetingEndedEvent;
use OCA\BigBlueButton\Event\MeetingStartedEvent;
use OCA\BigBlueButton\Event\RecordingReadyEvent;
use OCA\BigBlueButton\Event\RoomEvent;
use OCP\Activity\IManager as IActivityManager;
use OCP\EventDispatcher\Event;
use OCP\EventDispatcher\IEventListener;
use OCP\IUserSession;

/**
* @template-implements IEventListener<RoomEvent>
*/
class MeetingListener implements IEventListener {
/** @var IActivityManager */
private $activityManager;
Expand Down
4 changes: 4 additions & 0 deletions lib/Activity/RoomListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@
use OCA\BigBlueButton\AppInfo\Application;
use OCA\BigBlueButton\Event\RoomCreatedEvent;
use OCA\BigBlueButton\Event\RoomDeletedEvent;
use OCA\BigBlueButton\Event\RoomEvent;
use OCP\Activity\IManager as IActivityManager;
use OCP\EventDispatcher\Event;
use OCP\EventDispatcher\IEventListener;

/**
* @template-implements IEventListener<RoomEvent>
*/
class RoomListener implements IEventListener {
/** @var IActivityManager */
private $activityManager;
Expand Down
4 changes: 4 additions & 0 deletions lib/Activity/RoomShareListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use OCA\BigBlueButton\AppInfo\Application;
use OCA\BigBlueButton\Db\Room;
use OCA\BigBlueButton\Db\RoomShare;
use OCA\BigBlueButton\Event\RoomEvent;
use OCA\BigBlueButton\Event\RoomShareCreatedEvent;
use OCA\BigBlueButton\Event\RoomShareDeletedEvent;
use OCA\BigBlueButton\Service\RoomService;
Expand All @@ -13,6 +14,9 @@
use OCP\EventDispatcher\IEventListener;
use OCP\IGroupManager;

/**
* @template-implements IEventListener<RoomEvent>
*/
class RoomShareListener implements IEventListener {
/** @var IActivityManager */
private $activityManager;
Expand Down
3 changes: 3 additions & 0 deletions lib/Db/RestrictionMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
use OCP\DB\QueryBuilder\IQueryBuilder;
use OCP\IDBConnection;

/**
* @template-extends QBMapper<Restriction>
*/
class RestrictionMapper extends QBMapper {
public function __construct(IDBConnection $db) {
parent::__construct($db, 'bbb_restrictions', Restriction::class);
Expand Down
3 changes: 3 additions & 0 deletions lib/Db/RoomMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
use OCP\DB\QueryBuilder\IQueryBuilder;
use OCP\IDBConnection;

/**
* @template-extends QBMapper<Room>
*/
class RoomMapper extends QBMapper {
public function __construct(IDBConnection $db) {
parent::__construct($db, 'bbb_rooms', Room::class);
Expand Down
3 changes: 3 additions & 0 deletions lib/Db/RoomShareMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
use OCP\DB\QueryBuilder\IQueryBuilder;
use OCP\IDBConnection;

/**
* @template-extends QBMapper<RoomShare>
*/
class RoomShareMapper extends QBMapper {
public function __construct(IDBConnection $db) {
parent::__construct($db, 'bbb_room_shares', RoomShare::class);
Expand Down
3 changes: 3 additions & 0 deletions lib/Listener/UserDeletedListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
use OCP\EventDispatcher\IEventListener;
use OCP\User\Events\UserDeletedEvent;

/**
* @template-implements IEventListener<UserDeletedEvent>
*/
class UserDeletedListener implements IEventListener {
/** @var IActivityManager */
private $activityManager;
Expand Down
2 changes: 2 additions & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
errorBaseline="tests/psalm-baseline.xml"
findUnusedCode="false"
findUnusedBaselineEntry="false"
>
<projectFiles>
<directory name="lib" />
Expand Down

0 comments on commit 2b9267d

Please sign in to comment.