Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Libs 8.0.0 release #397

Merged
merged 15 commits into from
May 6, 2024
Merged

Libs 8.0.0 release #397

merged 15 commits into from
May 6, 2024

Conversation

iruzevic
Copy link
Member

@iruzevic iruzevic commented Apr 29, 2024

[8.0.0] - TBA

Changed

  • Complete refactor of the block registration process for faster and more efficient block registration.
  • Custom post type and taxonomy registration labels usage is now more consistent and simplified.
  • All enqueue methods now supports new scripts args introduced in WP 6.3.
  • All enqueue methods now implements manifestCacheinterface for fetching manifest data.
  • All AbstractGeolocation method now implements manifestCacheinterface for fetching manifest data.

Added

  • Internal caching in WordPress transients for faster manifest parsing and block registration.
  • Blocks render method now uses the Helpers::render method for better performance and code readability.
  • New ManifestCache CLI command with example.
  • New CLI commands for config theme and plugin.
    • Exception/InvalidBlock.php method: missingItemException.
  • src/Exception/InvalidManifest.php methods: missingManifestKeyException, emptyOrErrorManifestException, notAllowedManifestPathException, notAllowedManifestPathItemException, missingCacheTopItemException, missingCacheSubItemException.
  • src/Exception/InvalidPath.php method: missingDirectoryException, missingFileException, missingFileWithExampleException, wrongOrNotAllowedParentPathException.
  • New src/Helpers/ApiTrait.php helper for better API handling.
  • New recursiveArrayFind helper for finding items in multidimensional arrays recursively.
  • New casing helpers camelToSnakeCase, kebabToSnakeCase.
  • New getCurrentUrl helper for getting the current URL with query parameters.
  • New cleanUrlParams helper for cleaning URL parameters.
  • New project info helpers: getPluginVersion, getPluginName, getPluginTextDomain, getThemeVersion, getThemeName, getThemeTextDomain, getPluginDetails.
  • New constants for API handing in the src/Rest/Routes/AbstractRoute.php.

Fixed

  • Typo in block enqueue method for getBlockFrontentScriptHandle to getBlockFrontendScriptHandle method.

Removed

  • src/Blocks/AbstractBlocks.php method renderWrapperView is removed.
  • Config/AbstractConfigData.php is removed as it is no longer needed. Use helpers instead.
  • Config/ConfigDataInterface.php is removed as it is no longer needed.
  • LabelGeneratorTrait is removed as it is no longer needed.
  • All Enqueue methods no longer use manifest interface.
  • Exception/ComponentException.php is removed as it is no longer needed.
  • Exception/FailedToLoadView.php is removed as it is no longer needed.
  • Exception/FileMissing.php is removed as it is no longer needed.
  • src/Exception/InvalidCallback.php is removed as it is no longer needed.
  • src/Exception/InvalidNouns.php is removed as it is no longer needed.
  • src/Exception/InvalidService.php is removed as it is no longer needed.
  • src/Exception/PluginActivationFailure.php is removed as it is no longer needed.
  • Exception/InvalidBlock.php methods: missingBlocksException, missingComponentsException, missingNameException, missingComponentNameException, missingVariationNameException, missingViewException, missingRenderViewException, missingSettingsManifestException, missingWrapperManifestException, missingComponentManifestException, missingWrapperViewException, missingNamespaceException, missingSettingsKeyException, wrongFunctionUsedException, missingFileException, is removed as it is no longer needed.
  • src/Exception/InvalidManifest.php method: missingManifestItemException.
  • src/Exception/InvalidPath.php method: fromUri.
  • outputCssVariablesGlobal method no longer requires parameters.
  • outputCssVariables method is not longer supporting globalManifest parameter.
  • all methods from src/Helpers/ErrorLoggerTrait.php trait are removed.
  • All manifest classes are removed, src/Manifest/AbstractManifest.php, src/Manifest/ManifestExample.php, src/Manifest/ManifestInterface.php.

Deprecated

  • Helpers>Components class is deprecated and will be removed in the next major release. Use Helpers>Blocks class instead.
  • Helpers>Components>renderPartial method is deprecated and will be removed in the next major release. Use Helpers>Helpers>render method instead.
  • Helpers>Components>getManifest method is deprecated and will be removed in the next major release. Use Helpers>Helpers>getManifestByDir method instead.

TODO

  • Changelog
  • Release
  • Composer remove temp items
  • update packages
  • migration guide
  • docs for manifest cache
  • fix tests
  • fix and test CLI commands

@iruzevic iruzevic self-assigned this Apr 29, 2024
@iruzevic iruzevic marked this pull request as draft April 29, 2024 21:50
@iruzevic iruzevic requested a review from a team April 30, 2024 16:02
Copy link
Contributor

@goranalkovic-infinum goranalkovic-infinum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job!

src/Helpers/ObjectHelperTrait.php Outdated Show resolved Hide resolved
src/Helpers/DeprecatedTrait.php Outdated Show resolved Hide resolved
src/Helpers/ApiTrait.php Outdated Show resolved Hide resolved
src/Helpers/ApiTrait.php Outdated Show resolved Hide resolved
src/Exception/InvalidPath.php Outdated Show resolved Hide resolved
src/Exception/InvalidManifest.php Outdated Show resolved Hide resolved
src/Exception/InvalidManifest.php Outdated Show resolved Hide resolved
src/Exception/InvalidManifest.php Outdated Show resolved Hide resolved
src/Exception/InvalidBlock.php Outdated Show resolved Hide resolved
src/Blocks/AbstractBlocks.php Outdated Show resolved Hide resolved
Copy link
Contributor

@piqusy piqusy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work 👏🏼

Left a considerable amount of suggestions, nothing major in general captain

src/Helpers/Helpers.php Show resolved Hide resolved
src/Cache/AbstractManifestCache.php Outdated Show resolved Hide resolved
src/Cache/AbstractManifestCache.php Outdated Show resolved Hide resolved
src/Cache/AbstractManifestCache.php Outdated Show resolved Hide resolved
src/Cache/AbstractManifestCache.php Outdated Show resolved Hide resolved
src/Helpers/Helpers.php Outdated Show resolved Hide resolved
src/Helpers/Helpers.php Outdated Show resolved Hide resolved
src/Helpers/ObjectHelperTrait.php Outdated Show resolved Hide resolved
src/Helpers/ProjectInfoTrait.php Show resolved Hide resolved
src/Rest/Routes/AbstractRoute.php Show resolved Hide resolved
@iruzevic iruzevic marked this pull request as ready for review May 6, 2024 06:07
iruzevic and others added 2 commits May 6, 2024 08:14
Co-authored-by: Ivan Ramljak <22823970+piqusy@users.noreply.github.com>
Co-authored-by: Goran Alković <77000136+goranalkovic-infinum@users.noreply.github.com>
Co-authored-by: Goran Alković <77000136+goranalkovic-infinum@users.noreply.github.com>
piqusy
piqusy previously approved these changes May 6, 2024
Copy link
Contributor

@piqusy piqusy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, found just one minuscule typo

src/Helpers/Helpers.php Outdated Show resolved Hide resolved
Co-authored-by: Ivan Ramljak <22823970+piqusy@users.noreply.github.com>
@iruzevic iruzevic merged commit b69c7c7 into develop May 6, 2024
5 of 9 checks passed
@iruzevic iruzevic deleted the feature/optimizations branch May 6, 2024 11:01
iruzevic added a commit that referenced this pull request Jun 5, 2024
* Libs 8.0.0 release (#397)

* updating release 8.0.0 initial changes

* adding assets static cache helpers

* fixing cli for config commands

* adding event better and faster caching for blocks

* adding better errors for store trait

* fixing typo

* updating new wrapper and block render methods

* fixing getFullPath method with an alternative path

* adding fixes for wrong file name (#399)

* Feature/cli (#403)

* Major updates on WP-CLI and setup

* fixes

* fixes

* adding fixes for loading assets (#404)

* adding fixes for blocks limit

* adding additional options for caching

* adding additional options for caching (#405)

* release
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants