All notable changes to this project will be documented in this file.
This projects adheres to Semantic Versioning and Keep a CHANGELOG.
outputCssVariablesGlobalCleanmethod to theCssVariablesTraithelper. Not wrapped in a style tag. Used in patterns.outputCssVariablesGlobalmethod to theCssVariablesTraithelper.outputCssVariablesInlineCleanmethod to theCssVariablesTraithelper. Not wrapped in a style tag. Used in patterns.outputCssVariablesInlinemethod to theCssVariablesTraithelper.
getAttrsOutputhelper for not escaping the attributes if the value is 0.
convertMediaToWebPByPathhelper now correctly throws an error if the media origin does not exist.
- Memory leak in
MediaTraithelper.
WebPMediaColumnCli,WebPMediaColumnExample,MediaWebPTrait,UseWebPMediaClias it is not used anymore.
- WebP helpers are now using totally different approach with different hooks and methods. We are no longer creating a new image on upload and using the helper method to detect the extension but we are creating a new image on upload and using using native WordPress functions.
- composer packages.
pathUrlto thegetApiRouteUrlDatahelper
- New
getApiResponsehelper for better API response output. - API response codes constants.
getApiSuccessPublicOutputhelper.getApiWarningPublicOutputhelper.getApiErrorPublicOutputhelper.API_RESPONSE_CODE_SUCCESSconstant.API_RESPONSE_CODE_ERRORconstant.API_RESPONSE_CODE_ERROR_MISSINGconstant.API_RESPONSE_CODE_ERROR_FORBIDDENconstant.API_RESPONSE_CODE_SUCCESS_RANGEconstant.
- Added
addEditorBodyDebugClassmethod for debuggingtailwindClassesfor usage with Eightshift Frontend Libs Tailwind
- Replace
$attributescheck with$partfortailwindClasseshelper method because component can be without attributes.
- Replace deprecated
classnameshelper withclsx
- Output block/component title in
tailwindClassesif WP_DEBUG is true
- Added
ServiceCliInterfaceto custom post type and taxonomy abstract methods so that they are available in the CLI commands when flushing permalinks.
- New
I18nThemeCliandI18nPluginClicommands for creating i18n service classes for theme and plugin.
getAttrsOutputhelper now correctly escapes the attributes.prepareArgshelper now correctly handles the composer config path.
getAttrsOutputhelper to output attributes in a more readable format.
outputCssVariablesInlineandoutputCssVariablesGlobalmethods now correctly output the css variables.
getPluginDetailshelper now correctly handles the plugin path.
getProjectPathshelper now supportsrootandprojectRootpaths as a deprecated option.- CssVariables helpers now support global settings so it can be overridden via filter.
getUniquehelper will now support attributes param so if it used inside SSR component it uses the real unique ID.
parseManifesthelper now returns empty array if the manifest is empty or null.
- Updating
prepareSimpleApiParamshelper to be able to sanitize nested arrays also.
- Refactored all internal helpers for optimized performance
- Option to disable block registration just like we have it in JS part.
- Manifest cache is not stored in internal cache and transients and auto invalidated if needed. This approach is more efficient and faster and is preparation if you have persistent cache storage.
- PathsTrait joinPaths method now correctly handles folder names with dots.
- Refactored all internal helpers to cache everything possible
- All repeatable internal operations are now cached and loaded from memory
- Adding tests
- AbstractCli Trait helper and moved it to the Abstract CLI class.
- GitIgnore CLI command and example file.
- Export and Import CLI commands and example files.
- Removing wp_json_encode for native json_encode for caching performance.
- Manifest combined cache name.
- Internal caching mechanism for manifests.
- All caching is now stored in the
eightshiftfolder in the root of the theme or plugin. - All manifest caching is now stored on the disk and not in the transients.
Rendermethod for faster rendering time.
- wp_head helper for
outputCssVariablesGlobalhelper output used for older projects.
- Allowed blocks for forms broken on the WP 6.8 version.
- New
getRequestParamshelper to extract params from request based on the request type. - New
prepareSimpleApiParamshelper to prepare and secure params for simple API endpoints. - New
checkUserPermissionhelper to check user permission for route action.
- Geolocation and manifest cache for countries.
- Add Block and initial setup configuration.
- Unnecessary documentation
- Enqueue methods names for Theme and Admin
- Admin settings page view method no longer auto renders the view.
- Way the blocks are registered.
- Internal caching mechanism for manifests.
- All caching is now stored in the
eightshiftfolder in the root of the project. - DI container caching for autowiring classes are now cached.
wp-blockdependency togetAdminScriptDependenciesmethod.
- option to set css variables to other attribute values in the
outputCssVariablesmethod on inner components.
- option to set css variables to other attribute values in the
outputCssVariablesmethod.
- Updated
isWebPMediaUsedmethod to use static variable so the check is done only once.
get_plugin_datamethod will no longer translate the plugin name and description implemented in core6.7.
- Better caching of
Autowiring::buildServiceClassesmethod. - Better CLI loading for
ServiceInterfaceclasses.
- Removed boolean conversion to string from
processCombination(), which breaks strict values checking inin_array(). - Wrong name for
getAssetsPrefixmethod inAssetsclass.
- Bug with
combinationsoutput intailwindClasseshelper.
- Introduced new, more flexible, and simpler to use
tailwindClassesfunction. ReplacesgetTwPart,getTwDynamicPart, andgetTwClasses.- Potentially breaking:
twClassesEditoris now appended totwClasses. If you need editor-only classes, you can now use thetwClassesEditorOnlykey. Editor-only classes replacetwClasses, but will also have classes fromtwClassesEditor. - Potentially breaking:
partskey in manifest now supports specifying multiple parts just with a comma-separated string. - You can now apply classes to multiple parts within one option or combination! Also work with responsive options.
- There are now (basic) warnings for misconfigurations of parts and options.
- Potentially breaking:
- Wrong bool to string conversion in TW combinations.
- Unnecessary trim for
EIGHTSHIFT_DI_CACHE_FOLDERconstant.
- Theme options settings are now saved as string and not as object.
- Wrong condition for DI container caching.
- Updates on DI container to support caching and better performance.
- New
EIGHTSHIFT_DI_CACHE_FOLDERglobal constant for DI container caching folder.
- Default Tailwind config - PHP files are watched now only in the root folder and anything within
src/ - Fixed Tailwind outputs not working properly with booleans.
twClassesandtwClassesEditorcan now be passed as an array- Fixed a couple of bugs related to Tailwind class output.
- Tweaked default Prettier config for new projects.
- Changes visibility of the
registerServices()class.
- Blocks registration hooks now uses store registration hooks.
- WP-CLI command
reusable-header-footeris renamed topatterns-header-footer. Reusable blocksadmin menu is now namedPatternswhen moved to project.- WP-CLI command
admin-reusable-blocks-menuis renamed toadmin-patterns-menu. - Plugin now has WP-CLI prefix as
boilerplate-plugin. - WP-CLI command
theme-optionsis renamed totheme-options-acf.
- WP-CLI command
admin-menunow supportsview_componentprop. - WP-CLI command
admin-sub-menunow supportsview_componentprop. - WP-CLI command
admin-theme-options-menu - WP-CLI commands can now detect if they are used in the standard or Tailwind setup.
- WP-CLI global param
g_frontend_libs_type. - WP-CLI parent command name
ìnit-setup. - WP-CLI command
init-setup theme. - WP-CLI command
init-setup theme-clean. - WP-CLI command
init-setup plugin. - WP-CLI command
init-setup plugin-clean. - Enqueue function to deregister all WP default styles that should not be there.
- Tailwind trait for all Tailwind helpers used in the new setup.
- New setups for Tailwind setup for plugin and theme.
- WP-CLI command
theme-options.
- Admin assets dependency is needed to support the Tailwind setup.
- Countries get list pulled the data from the wrong manifest cache file.
- default attributes render will not throw error if attribute key is missing in component manifest.
- optimization wrong service class use constant.
- broken media upload after adding svg filters.
- wrong optimization service class namespace.
- Media support for svg and json.
- Optimization service class for better performance.
- Phpstan config fix for theme and plugin setup
- Project name variable will now be ucfirst on setup.
- Removed .git folder after the setup.
- Installation of theme and plugin eightshift-frontend-libs repo.
- Package and composer versions.
- Minimum PHP version is now 8.2.
- 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.
- 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.phpmethod:missingItemException.
src/Exception/InvalidManifest.phpmethods:missingManifestKeyException,emptyOrErrorManifestException,notAllowedManifestPathException,notAllowedManifestPathItemException,missingCacheTopItemException,missingCacheSubItemException.src/Exception/InvalidPath.phpmethod:missingDirectoryException,missingFileException,missingFileWithExampleException,wrongOrNotAllowedParentPathException.- New
src/Helpers/ApiTrait.phphelper for better API handling. - New
recursiveArrayFindhelper for finding items in multidimensional arrays recursively. - New casing helpers
camelToSnakeCase,kebabToSnakeCase. - New
getCurrentUrlhelper for getting the current URL with query parameters. - New
cleanUrlParamshelper 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.
- Typo in block enqueue method for
getBlockFrontentScriptHandletogetBlockFrontendScriptHandlemethod.
src/Blocks/AbstractBlocks.phpmethodrenderWrapperViewis removed.Config/AbstractConfigData.phpis removed as it is no longer needed. Use helpers instead.Config/ConfigDataInterface.phpis removed as it is no longer needed.LabelGeneratorTraitis removed as it is no longer needed.- All Enqueue methods no longer use
manifestinterface. Exception/ComponentException.phpis removed as it is no longer needed.Exception/FailedToLoadView.phpis removed as it is no longer needed.Exception/FileMissing.phpis removed as it is no longer needed.src/Exception/InvalidCallback.phpis removed as it is no longer needed.src/Exception/InvalidNouns.phpis removed as it is no longer needed.src/Exception/InvalidService.phpis removed as it is no longer needed.src/Exception/PluginActivationFailure.phpis removed as it is no longer needed.Exception/InvalidBlock.phpmethods: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.phpmethod:missingManifestItemException.src/Exception/InvalidPath.phpmethod:fromUri.outputCssVariablesGlobalmethod no longer requires parameters.outputCssVariablesmethod is not longer supportingglobalManifestparameter.- all methods from
src/Helpers/ErrorLoggerTrait.phptrait are removed. - All manifest classes are removed,
src/Manifest/AbstractManifest.php,src/Manifest/ManifestExample.php,src/Manifest/ManifestInterface.php.
Helpers>Componentsclass is deprecated and will be removed in the next major release. UseHelpers>Blocksclass instead.Helpers>Components>renderPartialmethod is deprecated and will be removed in the next major release. UseHelpers>Helpers>rendermethod instead.Helpers>Components>getManifestmethod is deprecated and will be removed in the next major release. UseHelpers>Helpers>getManifestByDirmethod instead.
7.1.2 - 2024-01-15
- Reverting the previous release.
7.1.1 - 2024-01-15
- Removed enqueuing dependency for block editor only styles.
7.1.0 - 2023-11-22
- Previously implemented private folder restrictions on render methods.
7.0.1 - 2023-11-10
- Re-enqueues lodash for WP 6.4 version.
7.0.0 - 2023-11-06
This is a major release that includes PHP8+ support. We tested it on the PHP 8.2.12 version.
- Config definition of version and name.
- Composer packages.
- Composer command names.
- Stan and Lint issues.
- Broken
db importcommand with the wrong setup.json path.
- Missing type hinting.
- New command to change version number.
- Better copy for `checkAttr`` helper if key is missing.
- Every enqueue script now has
is<>Usedmethod that is by default true.
- Blocks "old" version functions.
6.5.7 - 2023-10-24
renderandrenderPartialmethods are now no longer able to call the php files outside of themes/plugin folders. This is a security measure to prevent the execution of arbitrary code.rendermethod can now callwrapperas a component name.
6.5.6 - 2023-07-17
- Assets dependency function now returns array<int, string> instead of array<string, mixed>.
6.5.5 - 2023-07-07
- if you're using the WPML plugin, webP images won't be deleted unless all the attachments are removed from the admin interface.
6.5.4 - 2023-07-04
- you no longer need to add the "blockSsr" attribute when loading a block via server-side rendering. It will automatically utilize global CSS variables and provide the necessary styles.
6.5.3 - 2023-06-29
- column media wrong filter name.
- deprecation notice in the CLI.
6.5.2 - 2023-06-20
- updating random Id generator to output 8 rather than 32 characters.
6.5.1 - 2023-06-19
- wrong command name was changed from
plugin_managetoplugin-manage. - webp helper now has option to add allowed item so you can limit image types you don't want to use webP.
6.5.0 - 2023-06-13
- added new CLI command for initializing reusable header/footer (settings page for picking blocks, and default blocks)
- added new helper to render nice alert "windows"
- revamped some CLI command outputs and error outputs
6.4.0 - 2023-02-21
- Changed the default args for init blocks and use block variation CLI commands, as the button-block variation will not exist anymore in FE libs v8.0.
6.3.2 - 2023-01-27
- Forms block to allowed blocks list.
6.3.1 - 2022-12-23
- WP-CLI command name for pattern creating.
- unnecessary escape in the geolocation detect.
6.3.0 - 2022-10-04
- new WP-CLI command for plugins (install/update/delete) from global
setup.json. - new function for providing cookie expiration time.
- new file providing geolocation with WP-Rocket cache.
- WP-CLI will now look for an additional key when moving block/components. This key is used to list all inner block dependencies.
- storybook install WP-CLI description details.
- WP-CLI log output.
- config example wrong version output.
- config CLI wrong command version number.
- broken tests for geolocation.
- const public/private position in components.
- docs link.
- old WP-CLI command for updating plugins from global
setup.json.
6.2.0 - 2022-09-06
- Geolocation method
getGeolocationis now public. - Geolocation method
getGeolocationbetter error handling while files are missing.
6.1.0 - 2022-08-01
- Manifest fetching in tests bug.
- All methods to be PHP8 safe in case of arguments naming.
- Allow all blocks that was broken from the last deploy.
- New tests.
6.0.0 - 2022-07-11
- Bin cli command.
- Ei-exclude cli command.
- Build cli command.
- Updated packages.
- Updated tests.
- Refactored all cli commands for better usability and output.
- Most of the cli command names and prefixes.
- Internal way of moving blocks and files to the project to be faster.
- Descriptions for all cli commands with examples and links to repos.
- New service class for Geolocation.
- New service class for WebP and helpers.
5.1.0 - 2022-05-09
- new WP-CLI command for reusable blocks
- Css variables combine output small fix if no blocks are added to dom.
- Windows compatibility fixes.
5.0.2 - 2022-04-21
- Abstract blocks correct order of store registration.
5.0.1 - 2022-04-20
- WP-CLI command for only necessary blocks and components in the init phase.
5.0.0 - 2022-04-19
- Major braking changes do to updates on css variables, and helpers and updating min PHP version to 7.4.
- Full change log can be checked on Github releases.
4.1.0 - 2022-02-03
- Eightshift-forms as default allow block types.
- New WP-CLI command to create custom WP-CLI command. Example:
wp boilerplate create_cli_command. - New attribute to
outputCssVariablescalled$customSelector. - DI container caching on production or staging.
- Option to remove default paragraph block placeholder from the frontend if the content is empty.
- Custom post type revisions as default.
- Option to override default block class prefix in the blocks global settings manifest.
- Changed directory separator from
/to\DIRECTORY_SEPARATORconstant to be able to work cross-platform. - Various fixes and improvements.
- Limit enqueue admin only to admin area but not to the block editor.
4.0.0 - 2021-08-16
- Major braking changes do to updates on css variables, and helpers.
3.1.0 - 2022-30-01
- Two methods that will make libs work with WP 5.8+ and older versions.
3.0.8 - 2021-10-14
- Make CLI commands cross-os compatible
3.0.7 - 2021-07-14
- Minor improvements
3.0.6 - 2021-03-17
- Fixes the autowiring issue (exclude the non-service classes).
3.0.5 - 2021-02-04
- Updates on readme.
- New filter in Block.php to show custom post type blocks in sidebar.
- New WP-CLI command for project readme.
3.0.4 - 2021-01-15
- ModifyAdminAppearance class fixing develop to development and local.
- wp-config-project fixing global variable.
- Fixing project config cli.
3.0.3 - 2021-01-15
- Removed package-lock.json
- Removed composer.lock
- Removed version number from composer.json
3.0.2 - 2021-01-13
- Removed env from the config CLI.
3.0.1 - 2021-01-13
- Issues with -env parameter on
wp boilerplate setup_projectcommand. - Wrong Global variable name in Shortcodes.
- Small improvements.
- I18n - added hook priority to fix bug on loading languages.
- Config - removed
getProjectEnvmethod. - Config - removed
getConfigmethod.
- Switched from custom env variable to native WP_ENVIRONMENT_TYPE.
- ModifyAdminAppearance - implementing new env variable.
3.0.0 - 2021-01-05
MAYOR BREAKING CHANGES
- You should not try to update from version 2 to 3 because they are not compatible.
2.5.0 - 2020-08-10
- This will enable old packages who are on libs < 3 to update to WP 5.8 due to the breaking block hooks change.
2.4.1 - 2020-07-10
class-bem-menu-walker.php- removed declaration of db_fields.
- Setup script for CI deployment for core and plugins
2.4.0 - 2020-07-08
class-blocks.php- removed normal blocks view and made wrapper view as default.class-blocks.php- removed hasWrapper key.
class-components.php- changes onresponsive_selectorsmethod because of a bug in rendering bool.
2.3.0 - 2020-05-25
- Github actions.
- Phpstan.
class-blocks.phpreturns all colors from settings.- corrections from Phpstan.
- Made
get_service_classes_prepared_array()more flat. composer.jsonupdated packages, fixing scripts names.
2.2.2 - 2020-05-15
- New helper method for making responsive selectors.
2.2.1 - 2020-05-13
- PHP version 7.0 from Travis build.
- Check for block manifest validation.
2.2.0 - 2020-05-06
- Removed config dependency from the Asset classes and exposed config through Manifest.
editor-color-palette- Add theme support for editor color palette built from global manifest.json.
2.1.1 - 2020-03-05
- Missing enqueue method to load scripts in footer.
- Wrong namespace in components helpers.
2.1.0 - 2020-03-04
- build_di_container() method to class Main.
- class-components.php helper class for easier component rendering
- ability to wrap components with parent class on render
- class-main.php - Added build_di_container() method.
- class-blocks.php - Added custom filter
block-attributes-overrideto be able to override attributes depending on the post type.
- class-shortcode.php - moved from general namespace to helpers.
- class-base-post-columns.php was renamed to class-base-post-type-columns.php.
- class-invalid-block.php - Fixed error msg.
2.0.7 - 2020-01-29
add_theme_support( 'align-wide' )in class-blocks.php
2.0.6 - 2020-01-27
- Limitations the usage of only custom project blocks.
- Removing docs to new repository
- class-base-post-columns.php - New abstract class for adding articles listing columns.
- class-base-taxonomy-columns.php - New abstract class for adding taxonomy listing columns.
- class-base-user-columns.php - New abstract class for adding users listing columns.
- class-plugin-activation-failure.php - New plugin activation exception.
- Added docpress documentation.
- has-activation-interface.php - New interface used in plugin activation.
- has-deactivation-interface.php - New interface used in plugin deactivation.
- class-block.php - optimization on loading blocks data. Removed caching blocks in transient.
- class-manifest.php - optimization on loading manifest data. Removed caching manifest in transient.
- Add enqueue abstract class that can be extended in the project.
- Renderable_Block Interface - Fixing wrong type hinting for $inner_block_content.
- Updating readme
- Complete refactor on project organization.
- Moving, Babel, Webpack, linters config from boilerplate to eightshift-frontend-libs.
- Rewritten Gutenberg blocks setup.
- Renaming assets to manifest folder.
- Removing type hinting void for php 7.0.
- Removing Blocks folder and adding eightshift-blocks lib.
- Added DI instead of SL inside the class-main.php.
- Changed methods used for fetching the manifest items inside Manifest.php to non static methods.
- Updating Manifest.php with new methods
- Changed $content to $inner_block_content for better naming.
- Unsetting variables in block render.
- Changing wrapper block view path.
- Separating Wrapper_Block and General_Block.
- Interface for registrable field and route
- Changelog
- Interface name for rest route
0.1.0 - 2018-04-24
Init setup
- Main theme/plugin entrypoint.
- Post Type Registration.
- Taxonomy Registration.
- Gutenberg Blocks Registration.
- Assets Manifest data.