Skip to content
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
1 change: 1 addition & 0 deletions build/psalm/OcpSinceChecker.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public static function afterClassLikeVisit(AfterClassLikeVisitEvent $event): voi
}

$isTesting = str_contains($statementsSource->getFilePath(), '/lib/public/Notification/')
|| str_contains($statementsSource->getFilePath(), '/lib/public/Config/')
|| str_contains($statementsSource->getFilePath(), 'CalendarEventStatus');

if ($isTesting) {
Expand Down
5 changes: 2 additions & 3 deletions lib/public/Config/BeforePreferenceDeletedEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@

namespace OCP\Config;

use OCP\AppFramework\Attribute\Listenable;
use OCP\EventDispatcher\Event;

/**
* @since 25.0.0
*/
#[Listenable(since: '25.0.0')]
class BeforePreferenceDeletedEvent extends Event {
protected string $userId;
protected string $appId;
Expand Down
5 changes: 2 additions & 3 deletions lib/public/Config/BeforePreferenceSetEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@

namespace OCP\Config;

use OCP\AppFramework\Attribute\Listenable;
use OCP\EventDispatcher\Event;

/**
* @since 25.0.0
*/
#[Listenable(since: '25.0.0')]
class BeforePreferenceSetEvent extends Event {
protected string $userId;
protected string $appId;
Expand Down
5 changes: 2 additions & 3 deletions lib/public/Config/Exceptions/IncorrectTypeException.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@
namespace OCP\Config\Exceptions;

use Exception;
use OCP\AppFramework\Attribute\Throwable;

/**
* @since 32.0.0
*/
#[Throwable(since: '32.0.0')]
class IncorrectTypeException extends Exception {
}
5 changes: 2 additions & 3 deletions lib/public/Config/Exceptions/TypeConflictException.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@
namespace OCP\Config\Exceptions;

use Exception;
use OCP\AppFramework\Attribute\Throwable;

/**
* @since 32.0.0
*/
#[Throwable(since: '32.0.0')]
class TypeConflictException extends Exception {
}
5 changes: 2 additions & 3 deletions lib/public/Config/Exceptions/UnknownKeyException.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@
namespace OCP\Config\Exceptions;

use Exception;
use OCP\AppFramework\Attribute\Throwable;

/**
* @since 32.0.0
*/
#[Throwable(since: '32.0.0')]
class UnknownKeyException extends Exception {
}
2 changes: 0 additions & 2 deletions lib/public/Config/IUserConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
* Similarly, some methods from this class are marked with a warning about ignoring
* lazy loading. Use them wisely and only on parts of the code that are called
* during specific requests or actions to avoid loading the lazy values all the time.
*
* @since 32.0.0
*/
#[Consumable(since: '32.0.0')]
interface IUserConfig {
Expand Down
3 changes: 2 additions & 1 deletion lib/public/Config/Lexicon/Entry.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@
namespace OCP\Config\Lexicon;

use Closure;
use OCP\AppFramework\Attribute\Consumable;
use OCP\Config\ValueType;

/**
* Model that represent config values within an app config lexicon.
*
* @see ILexicon
* @since 32.0.0
*/
#[Consumable(since: '32.0.0')]
class Entry {
/** @since 32.0.0 */
public const RENAME_INVERT_BOOLEAN = 1;
Expand Down
4 changes: 0 additions & 4 deletions lib/public/Config/Lexicon/ILexicon.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,12 @@

namespace OCP\Config\Lexicon;

use OCP\AppFramework\Attribute\Consumable;
use OCP\AppFramework\Attribute\Implementable;

/**
* This interface needs to be implemented if you want to define a config lexicon for your application
* The config lexicon is used to avoid conflicts and problems when storing/retrieving config values
*
* @since 32.0.0
*/
#[Consumable(since: '32.0.0')]
#[Implementable(since: '32.0.0')]
interface ILexicon {

Expand Down
5 changes: 3 additions & 2 deletions lib/public/Config/Lexicon/Preset.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

namespace OCP\Config\Lexicon;

use OCP\AppFramework\Attribute\Consumable;

/**
* list of preset to handle the default behavior of the instance
*
Expand All @@ -22,9 +24,8 @@
* - **Preset::CLUB** - Club/Association
* - **Preset::FAMILY** - Family
* - **Preset::PRIVATE** - Private
*
* @since 32.0.0
*/
#[Consumable(since: '32.0.0')]
enum Preset: int {
/** @since 32.0.0 */
case LARGE = 9;
Expand Down
5 changes: 3 additions & 2 deletions lib/public/Config/Lexicon/Strictness.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,17 @@

namespace OCP\Config\Lexicon;

use OCP\AppFramework\Attribute\Consumable;

/**
* Strictness regarding using not-listed config keys
*
* - **Strictness::IGNORE** - fully ignore
* - **Strictness::NOTICE** - ignore and report
* - **Strictness::WARNING** - silently block (returns $default) and report
* - **Strictness::EXCEPTION** - block (throws exception) and report
*
* @since 32.0.0
*/
#[Consumable(since: '32.0.0')]
enum Strictness {
/** @since 32.0.0 */
case IGNORE; // fully ignore
Expand Down
4 changes: 2 additions & 2 deletions lib/public/Config/ValueType.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@

namespace OCP\Config;

use OCP\AppFramework\Attribute\Consumable;
use OCP\Config\Exceptions\IncorrectTypeException;
use OCP\IAppConfig;
use UnhandledMatchError;

/**
* Listing of available value type for typed config value
*
* @since 32.0.0
*/
#[Consumable(since: '32.0.0')]
enum ValueType: int {
/**
* @since 32.0.0
Expand Down
Loading