Comments (4)
@Skrol29 what do you think about releasing a new major version of the TBS package, which will support minimum PHP 7.4?
This can be done with preservation of API and compatibility (using a decorators). This will have modern code that adheres to PSR, with phpunit 9 for testing, etc.
from tinybutstrong.
@Skrol29 what do you think about releasing a new major version of the TBS package, which will support minimum PHP 7.4?
This can be done with preservation of API and compatibility (using a decorators). This will have modern code that adheres to PSR, with phpunit 9 for testing, etc.
Having a major version suitable for PHP 7 and modern coding is a very nice idea which I often think of.
I also think about leaving unused features (such as Assigned merging for which I have zero feedback) ; add new a barrel feature for the Engine in order to have it processing sub-templates in the same way as OpenTBS ; and some few renaming.
So it is not clear for me to have all this in one major version or several.
from tinybutstrong.
Hi,
Sorry I need more time to reproduce this issue since Preloading is not available on PHP for Windows for now. (shame on me, I use Windows). My Linux environment is far from here.
Itβs surprising that constants are ignored with preloading. The documentation is unclear on this point :
Any symbols (functions, classes, etc.) in those files will then become globally available
I wonder if PHP 8 has the same behavior.
Nevertheless I agree the next major TBS version should avoid named constants (define) and use Class constants instead.
A waiting solution could be to have TBS and OpenTBS constants defined only once dynamically at the first instantation of the class.
Does such a solution sounds ok for you ?
from tinybutstrong.
@Skrol29 I was also surprised, but it is consequent as define()
is a function called at runtime and preloading doesn't run any code, but only compiles the symbols and keeps them in memory. So code in preloaded files outside those symbols will never run, because the actual files are not required/included anymore.
A waiting solution could be to have TBS and OpenTBS constants defined only once dynamically at the first instantation of the class. Does such a solution sounds ok for you ?
You mean inside the constructor of the main classes with a check like if (!defined('MY_GLOBAL_CONSTANT')){define('MY_GLOBAL_CONSTANT', 'MY_VALUE');}
? Could work.
My devsystem is also on windows, so I see that problem only in staging/production. Nice surprise. ;)
Besides that: A new major version with contemporary coding is always a good idea.
from tinybutstrong.
Related Issues (20)
- Formatting some timestamps results in wrong date HOT 13
- Random XML rendering HOT 1
- can't access your website HOT 2
- Apply enlarge to CSS-compatible comments HOT 2
- Connect to codeigniter
- Add newline or <br />? if not empty HOT 6
- Parameter to detect if field exists? HOT 4
- using magnet to remove attribute resulting in bad render HOT 4
- TBS project development
- Feature request: support multiple "when" conditions
- Feature request: allow for \ArrayAccess and \ArrayObject in addition to plain arrays.
- tbs_class.php line 3936
- Replace text in paragraph keeping the runs object and styles
- PHP doc variable types HOT 1
- p tag bug?(solved) HOT 2
- What is the license, please? HOT 1
- TBS library not working with latest pptx versions HOT 8
- The OnData event of plugins no longer works in version 3.15 HOT 1
- frm=ddd with locale doesn't work anymore since the removal of strftime in newer TBS Versions
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tinybutstrong.