Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

nette-upgrading

БесплатноБез исполняемых скриптовНе проверен

Invoke whenever Nette code uses a name you are not sure still exists, and before writing any class from Nette 2.x/3.0-era memory. A lookup table mapping every…

netteот nette★ 47 звёзд на GitHub

Об этом скилле

Nette: Retired Names and Silent Traps

Most of these old names still work – as a class_alias, a deprecated stub or a magic property – and at runtime most of them are completely silent. A real E_USER_DEPRECATED is the exception (Strings::TRIM_CHARACTERS, the @persistent / @crossOrigin annotations, NEON ..., getParameter($name, $default), @property-deprecated), so never rely on a notice appearing.

They are not invisible to tooling, though. The aliases live in each package's src/compatibility.php / compatibility-intf.php in this shape:

if (false) {
	/** @deprecated use Nette\Database\Explorer */
	class Context extends Explorer
	{
	}
} elseif (!class_exists(Context::class)) {
	class_alias(Explorer::class, Context::class);
}

The if (false) branch never executes, but the IDE, PHPStan and Composer's classmap all read it – which is exactly why the editor strikes the old name through while PHP says nothing. So static analysis will flag these; a passing test run will not. Prefer the current name always. Area-specific tables live in nette-security (Authenticator, Authorizator, User constants) and nette-components (component tree, redrawControl); this skill does not repeat them.

Interfaces: the I prefix was dropped

Retired Current Note
Nette\Application\IResponse Nette\Application\Response alias, silent
UI\ITemplate, ITemplateFactory, IRenderable, ISignalReceiver, IStatePersistent UI\Template, TemplateFactory, Renderable, SignalReceiver, StatePersistent alias, silent
Nette\Bridges\ApplicationLatte\ILatteFactory …\LatteFactory alias, silent
Nette\Application\IRouter Nette\Routing\Router alias, silent up to application 3.2; removed in 3.3 – hard error
Nette\Caching\IStorage, Nette\Mail\IMailer Caching\Storage, Mail\Mailer alias, silent
Nette\Localization\ITranslator, Nette\Utils\IHtmlString Localization\Translator, Nette\HtmlStringable alias, silent
Nette\Security\IUserStorage Nette\Security\UserStorage removed in security 3.2 – hard error, and a different contract
Nette\Database\IRow, IRowContainer – deprecated as unnecessary

Nette\Application\IPresenter and IPresenterFactory keep the I – do not "modernize" them.

Renamed classes

Retired Current Since
Nette\Configurator Nette\Bootstrap\Configurator bootstrap 3.1 – alias, silent
Nette\Database\Context Nette\Database\Explorer database 3.1 – alias, silent (src/compatibility.php)
Nette\Security\Identity Nette\Security\SimpleIdentity security 3.1 – deprecated stub, silent. Note SimpleIdentity extends Identity, so an Identity is not an instance of SimpleIdentity and a SimpleIdentity type hint rejects it
Nette\Http\UserStorage (use Nette\Security\UserStorage) removed in http 3.4
Nette\PhpGenerator\PhpLiteral Nette\PhpGenerator\Literal deprecated stub
Nette\DI\Statement Nette\DI\Definitions\Statement DI 3.0 – alias, silent
Nette\Object Nette\SmartObject trait removed in 3.0 (Nette\LegacyObject in nette/deprecated)
Nette\Utils\Finder from nette/finder ships in nette/utils 4.0 composer remove nette/finder

Constants: UPPER_CASE became PascalCase

Every one below is a deprecated alias that still evaluates, so the old code runs unchanged.

Retired Current
Cache::EXPIRE, EXPIRATION Cache::Expire (also Priority, Sliding, Tags, Files, Items, Callbacks, Namespaces, All; CONSTS -> Constants)
Form::FILLED, EMAIL, MIN_LENGTH, IS_IN, … Form::Filled, Email, MinLength, IsIn, …
Form::PATTERN_ICASE Form::PatternInsensitive
Presenter::INVALID_LINK_WARNING, PRESENTER_KEY, SIGNAL_KEY, ACTION_KEY, FLASH_KEY, DEFAULT_ACTION InvalidLinkWarning, PresenterKey, SignalKey, ActionKey, FlashKey, DefaultAction
IRequest::GET, POST IRequest::Get, Post
IResponse::S404_NOT_FOUND, REASON_PHRASES IResponse::S404_NotFound, ReasonPhrases
IResponse::SAME_SITE_LAX / SameSiteLax Nette\Http\SameSite::Lax (enum, http 3.4)
Debugger::DEVELOPMENT, PRODUCTION, DETECT, COOKIE_SECRET Debugger::Development, Production, Detect, CookieSecret
Image::SHRINK_ONLY, STRETCH, EMPTY_GIF Image::ShrinkOnly, Stretch, EmptyGIF
Image::FIT, FILL, EXACT Image::OrSmaller, OrBigger, Cover – renamed, not just recased
IComponent::NAME_SEPARATOR IComponent::NameSeparator (3.0.3; removed in 4.0)
Strings::TRIM_CHARACTERS Strings::TrimCharacters

Renamed methods

Retired Current
Cache::start() Cache::capture() (caching 3.1)
FileUpload::getName() getUntrustedName() (http 3.0.5) – also `getSanitizedNa
Полный SKILL.md на GitHub

Установить nette-upgrading в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл nette-upgrading?

Invoke whenever Nette code uses a name you are not sure still exists, and before writing any class from Nette 2.x/3.0-era memory. A lookup table mapping every retired name to its current one - `I`-prefixed interfaces (IAuthenticator, IRouter, IStorage, ITranslator, IMailer, ITemplate), UPPER_CASE constants renamed to PascalCase (Cache::EXPIRE, Form::FILLED, Debugger::PRODUCTION, Image::SHRINK_ONLY, Presenter::INVALID_LINK_*), Nette\Database\Context vs Explorer, Nette\Security\Identity vs SimpleIdentity, Nette\Configurator vs Nette\Bootstrap\Configurator, FileUpload::getName() vs getUntrustedName(), static Passwords vs the service, and flags replaced by named arguments. Also trigger for "upgrade", "migration", "BC break", "deprecated", "Nette 2 to 3", "which version renamed this", `E_USER_DEPRECATED` notices, and "why does this method/class not exist".

Как установить скилл nette-upgrading?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл nette-upgrading запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить nette-upgrading с