
phpFashion
Základní informace o zdroji
Ikona | ![]() |
---|---|
Domovská stránka | https://phpfashion.com/ |
RSS export | http://phpfashion.com/feed/rss |
Systémové informace o zdroji
ID | 290 |
---|---|
Jmenné ID | phpfashion |
Články ručně přidává správce systému | NE |
Články jsou schvalovány správcem | NE |
Titulek zdroje stahován z RSS exportu | ANO |
Kontrola aktuálnosti proběhla | 27. ledna 2023 05:35 |
Návratový kód | HTTP 200 |
RSS export naposledy zpracován | 27. ledna 2023 05:35 |
Kontrola aktuálnosti naplánována na | 27. ledna 2023 06:35 |
Nette DI 3.1: transition release
Transition releases do not bring new features, but are intended to point out via notices anything that will work differently in the new major version and to advise you on how to update. This was the case for example with Latte 2.11 or the newly released…
Tabulátory místo mezer jako projev ohleduplnosti
Určitě už jste někdy narazili debatu „tabulátory vs. mezery“ pro odsazování. Polemika probíhá od nepaměti a oba tábory vyzdvihují své argumenty: Tabulátory: odsazování je jejich účel menší soubory, protože odsazení zabírá jeden znak můžete si nastavit…
Prefixes and Suffixes Do Not Belong in Interface Names
Using the I prefix or Interface suffix for interfaces, and Abstract for abstract classes, is an antipattern. It doesn't belong in pure code. Distinguishing interface names actually blurs OOP principles, adds noise to the code, and causes complications…
I-prefixes disappear from interface names
In Nette, interfaces were named with the letter I at the beginning (e.g. IRequest). A couple of years ago, an extremely slow and long term process began, which quietly while maintaining backwards compatibility is getting rid of these prefixes. How…
Latte 3: an impressive leap
The fanfare resounds through the hall and Latte 3 comes on the scene. With a completely rewritten compiler. The new version represents the biggest evolutionary leap ever made in Latte. Why Latte? Latte has a funny history. It wasn't originally meant to…
For less screaming in the code
The Nette coding style is undergoing a minor modification: the PascalCase notation is now used for class constants instead of the original SCREAMING_SNAKE_CASE. The tradition of using capital letters for constants comes from the C language, where…
Přidejte si značku {texy} do Latte
Knihovna Texy od verze 3.1.6 přidává podporu pro Latte 3 v podobě značky {texy}. Co umí a jak ji nasadit? Značka {texy} představuje snadný způsob, jak v Latte šablonách psát přímo v syntaxi Texy: {texy} You Already Know the Syntax ---------- No kidding,…
Latte 3: největší skok v dějinách Nette
Prosím o fanfáry, na scénu přichází Latte 3. S kompletně přepsaným kompilátorem. Nová verze představuje největší vývojový skok, jaký kdy v Nette nastal. Proč vlastně Latte Latte má překvapivou historii. Původně totiž nebylo myšleno vážně. Mělo dokonce…
Nejsi ve vleku cargo kultů?
Před mnoha lety jsem si uvědomil, že když v PHP ve funkci používám proměnnou obsahující předdefinovanou tabulku dat, tak při každém volání funkce musí být pole znovu „vytvořené“, což je překvapivě dost pomalé. Příklad: function isSpecialName(string…
Nette Vite – using Nette with Vite for rapid local development
Vite is a next-generation frontend tool for loading JS and CSS files directly from sources, without the need for compilation and using modern standards. I'm sure someone is annoyed that when they make an edit on the frontend, they have to compile and…
Dependent selectboxes elegantly in Nette and pure JS
How to create chained select boxes, where after selecting a value in one the options are dynamically updated in the other? This is an easy task in Nette and pure JavaScript. We will show a solution that is clean, reusable end secure. Data model As an…
New plugin NEON Nette Support
IDE plugins bring comfort to your development and simplify your work. I enjoy developing plugins for the IntelliJ platform and would like to deliver the best products possible. Today I'm going to introduce a new plugin NEON Nette Support for PhpStorm…
Tracy 2.9 and evolution of the iconic screen
Tracy's distinctive red screen has barely changed in the 15 years of its existence, and it's an exaggeration to say that the evolution has been in search of the ideal shade of red. In fact, there have been plenty of minor visual improvements, but not…
Zapisovat nullable types s otazníkem nebo bez?
Vždycky mi vadila jakákoliv nadbytečnost nebo duplicita v kódu. Už jsem o tom psal před mnoha lety. Při pohledu na tento kód prostě trpím: interface ContainerAwareInterface { /** * Sets the container. */ public function setContainer(ContainerInterface…
Readonly proměnné v PHP 8.1 vás zaskočí
PHP 8.1 přichází se zajímavou novinkou: readonly členské proměnné: Začneme rovnou příkladem použití: class Test { public readonly string $prop; public function setProp(string $prop): void { $this->prop = $prop; // legal initialization } } $test = new…
How to pass app directory paths to services
In this very short article, I will show you 2 simple ways how to pass directory constants to services, it's very elementary thing that most of you know, but it never hurts to see it again. Let's say we have CronTaskExecutor for executing cron tasks from…
Nette Http 3.1: much smarter sessions
Nette has Nette has always taken a cautious approach to sessions. It only started them automatically when users needed them. Which specifically means: when they write to it when they read from it and there is a session ID cookie Because if the cookie…
Jak probíhá shutdown v PHP a volání destruktorů?
Ukončení požadavku v PHP se skládá z těchto kroků prováděných v uvedeném pořadí: Volání všech funkcí registrovaných pomocí register_shutdown_function() Volání všech metod __destruct() Vyprázdnění všech output bufferů Ukončení všech rozšíření PHP (např…
How to write error handler in PHP?
If you are writing your own error handler in PHP, it is absolutely necessary to follow a few rules. Otherwise, it may break the behavior of other libraries and applications that do not expect betrayal in the error handler. Parameters The signature of…
Jak napsat error handler v PHP?
Pokud píšete vlastní error handler pro PHP, je bezpodmínečně nutné dodržet několik pravidel. Jinak může nabourat chování dalších knihoven a aplikací, které nečekají v error handleru zradu. Parametry Signatura handleru vypadá takto: function…
Nette Tester 2.4.0 is out
A new smaller release is out. And since there are no posts on the blog about the patches from 2.3.1 to 2.3.5, I will address them in this post too. Let's move from the past to the present. Patch releases Version 2.3.1 is purely maintenance release, just…
News in Nette Schema 1.2
Nette Schema is the youngest addition to the Nette family. The library was originally created for the needs of Nette DI, ie to validate and normalize the input configuration files and to inform about possible errors. Nette Schema was an attempt to find…
News in PhpGenerator 3.5
PhpGenerator has learned all the language features of PHP 8. Let's see how you can start using them right away. Constructor Property Promotion A very nice new feature of PHP 8 is the constructor property promotion, a syntactic sugar that saves writing…
News in Nette Security 3.1
You'll be amazed at the horizons of this new version, and how easy it is to build web applications that don't need a session. Clarity Before we look at the main news, we must say that Nette is gradually leaving the prefix I in the interface names, so it…
News in Nette Forms 3.1
Protection against CSRF using cookies The vulnerability of a CSRF is based on the trick that the form is spoofed by an attacker and sent from his site, ie from another domain, against which Nette has always had protection, which is turned on by the…
News in Nette Http 3.1
News in Nette Http version 3.1 mainly concerns the current development of browsers in relation to cookies. Current browsers finally work without bugs with the SameSite flag, so Nette automatically sends it. So now Nette sends all cookies (including…
News in Nette Database 3.1
With an elegant way of working with a transaction comes a new method transaction(). You pass in a callback that runs in the transaction. If any exception is thrown, the transaction is rolled back. If everything goes well, the transaction will be…
News in Nette Utils 3.2
One of the main new features of Nette Utils 3.2 is the new static class Nette\Utils\Floats with useful functions for comparing decimal numbers. The class solves a problem that surprised many programmers when they found that equality does not apply for…
Services don't need names
I love Nette Framework's dependency injection solution. I really do. This post is here to share this passion, explaining why I think it is the best DI solution in today's PHP ecosystem. (This post has originally been published on the author's blog.)…