Releases: rmunate/PHP2JS
V 4.5.1
V 4.5.0
V 4.4.0
V 4.3.0
V 4.2.0
V 4.1.0
V 4.0.0
[4.0.0] - 2023-11-10
Added
- QuickRequest: Fetch request handler with event handling, installed alongside this package but can also be used independently.
Changed
-
Property
vars
: In previous versions, it was used to access variables returned from PHP; now it has been replaced withdata
. For example:PHP2JS.data.value
-
Object Passed to JavaScript: In previous versions, it was possible to create more than one object from PHP in JavaScript, which does not guarantee a good Server-Side Rendering (SSR) practice. The current version ensures that values are passed to JavaScript only once, and this is the only object to be manipulated from this context.
-
Compatibility: The source code has been rewritten to be compatible with PHP 7.4 or higher and Laravel Framework versions 8.0 or higher.
-
Source Code: The source code of this package has been rewritten by more than 90%, so it does not have support for previous versions. Efforts were made to improve performance, security, and the coherence of each class.
Removed
-
Blade Directives: Blade directives have been removed since, if not used with a different alias in each, they conflict with each other. Now, data sharing with JavaScript will only be handled from controllers. Suppressed Directives:
@PHP2JS_VARS()
@PHP2JS_VARS_STRICT(['variable1','variable2'])
@PHP2JS_AGENT()
@PHP2JS_URL()
@PHP2JS_CSRF()
@PHP2JS_FRAMEWORK()
@PHP2JS_PHP()
@PHP2JS_USER()
-
Artisan Command: Since rendering Blade directives is not required, the
php2js:clear
command has been removed. -
Method
attach
: As the use of pre-built blocks is not a generality and may not always meet the specific needs of an application, the functionality to share values with JavaScript has been removed, leaving it to the developer's discretion. -
Unused JavaScript Methods: All methods lacking real use of the resulting object when sharing data from PHP2JS with JavaScript have been removed. Suppressed Methods:
.clear()
.clearWithoutFunctions();
.assignAndClear()
.assignAndClearWithoutFunctions()
.onlyFunctions()
.exceptFunctions()
.getAllProperties()
.getAllProperties()
V 3.8.14
PHP2JS
The Library that Made Handling Monoliths in Laravel Simple - LARAVEL PHP Framework
βοΈ This library is compatible with Laravel versions 9.0 and above βοΈ
Documentation
Installation
To install the dependency via Composer, run the following command:
composer require rmunate/php2js
Make sure that in the composer.json
file, you have the library in the latest version. "rmunate/php2js": "^3.8"
Always after installing, run the command:
php artisan php2js:clear
License
This project is under the MIT License.
π Support My Projects! π
Make any contributions you see fit; the code is entirely yours. Together, we can do amazing things and improve the world of development. Your support is invaluable. β¨
If you have ideas, suggestions, or just want to collaborate, we are open to everything! Join our community and be part of our journey to success! ππ©βπ»π¨βπ»
V 3.8.13
Release 3.8.13 (2023-10-05 | 21:47)
- Updated exception methods.
- Updated browser identifiers.
- Updated Blade directives (Obsolete directives are removed, support for version 2.x is retained).
- Changed 'if' statements to ternary operators.
- Adjusted exception messages.
- Modified Artisan command.
- Adjusted package version constants and package name.
- Updated documentation.
Documentation
V 3.8.12
PHP2JS
The Library that Made Handling Monoliths in Laravel Simple - LARAVEL PHP Framework
βοΈ This library is compatible with Laravel versions 9.0 and above βοΈ
Documentation
Installation
To install the dependency via Composer, run the following command:
composer require rmunate/php2js
Make sure that in the composer.json
file, you have the library in the latest version. "rmunate/php2js": "^3.8"
Always after installing, run the command:
php artisan php2js:clear
License
This project is under the MIT License.
π Support My Projects! π
Make any contributions you see fit; the code is entirely yours. Together, we can do amazing things and improve the world of development. Your support is invaluable. β¨
If you have ideas, suggestions, or just want to collaborate, we are open to everything! Join our community and be part of our journey to success! ππ©βπ»π¨βπ»