Skip to content

Releases: hydephp/develop

v0.50.0-beta - 2022-07-26

26 Jul 18:40
Compare
Choose a tag to compare

About

This release contains several breaking changes. You will need to update your configuration to continue using the new changes. Each one has been documented in this changelog entry, which at the end has an upgrade guide.

Overview of major changes

As there are a lot of changes, here is first a quick overview of the major ones. See the full list after this section.

  • Alpine.js is now used for interactions.
  • HydeFront has been rewritten and is now on version 2.x.
  • The hyde.css and hyde.js files have now for all intents and purposes been merge into app.css and refactored to Alpine.js, respectively.
  • The documentation pages are now styled using TailwindCSS instead of Lagrafo.
  • Moved some configuration options from hyde.php to site.php
  • Moved Composer dependencies, you will laravel-zero/framework added to your Hyde composer.json file.

Note that the goal with this release is to make the framework more stable and developer friendly, but without it affecting the end user experience. For example, the visual experience as well as the interactions of the refactored documentation pages are minimal and most users won't notice any change. However, for developers, the changes are significant and will reduce a lot of complexity in the future.

Added

  • Added Alpine.js to the default HydePHP layout
  • Added a new configuration file, config/site.php, see below
  • Added RSS feed configuration stubs to config/site.php
  • Added an Includes facade that can quickly import partials
  • Added an automatic option to load footer Markdown from partial
  • Added the hyde.load_app_styles_from_cdn option to load _media/app.css from the CDN

Changed

  • Move laravel-zero/framework Composer dependency to hyde/hyde package
  • Moved site specific configuration settings to config/site.php
    • Moved config option hyde.name to site.name
    • Moved config option hyde.site_url to site.url
    • Moved config option hyde.pretty_urls to site.pretty_urls
    • Moved config option hyde.generate_sitemap to site.generate_sitemap
    • Moved config option hyde.language to site.language
    • Moved config option hyde.output_directory to site.output_directory
  • The default site.url is now http://localhost instead of null
  • Merged configuration options for the footer, see below
  • Rebrand lagrafo documentation driver to HydeDocs
  • Hyde now requires a minimum version of HydeFront v2.x, see release notes below
  • internal: Refactor navigation menu components and improve link helpers
  • internal: The main Hyde facade class has been split to house the logic in the HydeKernel class, but all methods are still available through the new facade with the same namespace
  • internal: Move tests foundation to new testing package
  • internal: Renamed GeneratesTableOfContents.php to GeneratesSidebarTableOfContents.php

Removed

  • Removed \Hyde\Framework\Facades\Route. You can swap out usages with \Hyde\Framework\Models\Route without side effects.
  • Removed ConvertsFooterMarkdown.php
  • Removed internal $siteName config variable from config/hyde.php

Fixed

  • Fixed bug #260 where the command to publish a homepage did not display the selected value when it was supplied as a parameter
  • Fixed bug #272, only generate the table of contents when and where it is actually used
  • Fixed bug #41 where search window does not work reliably on Safari

Upgrade Guide

Here are some instructions for upgrading an existing project.
You should also read the standard upgrade guide first for general advice, https://hydephp.com/docs/master/updating-hyde.

If you use Git, you may be able to automatically configure some of these by merging https://github.com/hydephp/hyde into your project. Alternatively, you can download the release and unzip it into your project directory, and using GitHub Desktop or VS Code (or whatever you use) to stage the new changes without affecting your project's configuration.

Core file changes

Here is an overview of the core files that have changed and that you will most likely need to update. Some of these have detailed instructions further down.

  • config/site.php (new)
  • config/hyde.php (changed)
  • config/app.php (changed)
  • app/bootstrap.php (changed)
  • composer.json (changed)
  • package.json (changed)
  • resources\assets\app.css (changed)
  • _pages\404.blade.php (changed)

A large number of Blade views have also changed. You may want to update pretty much all of them. See the diff for a list of files that have changed.

Updating Composer

When updating an existing project, you may need to add laravel-zero/framework to your Hyde composer.json file.

    "require": {
        "php": "^8.0",
        "hyde/framework": "^0.50",
        "laravel-zero/framework": "^9.1"
    },

Using the new site config

Site-specific config options have been moved from config/hyde.php to config/site.php. The Hyde config is now used to configure behaviour of the site, while the site config is used to customize the look and feel, the presentation, of the site.

The following configuration options have been moved. The actual usages remain the same, so you can upgrade by using copying over these options to the new file.

  • hyde.name
  • hyde.site_url (is now just site.url)
  • hyde.pretty_urls
  • hyde.generate_sitemap
  • hyde.language
  • hyde.output_directory

If you have published and Blade views or written custom code that uses the config options, you may need to update them. You can do this by republishing the Blade views, and/or using search and replace across your code. VSCode has a useful feature to make this a breeze: CMD/CTRL+Shift+F.

Using the new footer config

The footer configuration options have been merged. Prior to this update, the config option looked as follows:

// filepath: config/hyde.php
'footer' => [
  'enabled' => true,
  'markdown' => 'Markdown text...'
],

Now, the config option looks as follows:

// filepath: config/hyde.php

// To use Markdown text
'footer' => 'Markdown text...',

// To disable it completely
'footer' => false,

As you can see, the new config option is a string or the boolean false instead of an array. We use the same option for both the Markdown text and the footer disabled state.

Updating Blade Documentation Views

This release rewrites almost all of the documentation page components to use TailwindCSS. In most cases you won't need to do anything to update, however, if you have previously published the documentation views, you will need to update them.

Release Notes for HydeFront v2.x

HydeFront version 2.0 is a major release and has several breaking changes.
It is not compatible with HydePHP versions lower than v0.50.0-beta. HydePHP versions equal to or later than v0.50.0-beta require HydeFront version 2.0 or higher.

Many files have been removed, as HydePHP now uses Alpine.js for interactions, and TailwindCSS for the documentation pages.

HydeFront v1.x will receive security fixes only.

What's Changed

Read more

v0.49.0-beta - 2022-07-15

15 Jul 11:08
Compare
Choose a tag to compare

Added

  • Added configuration option to quickly enable HTML tags in Markdown

Changed

  • The DataCollection module now no longers filters out files starting with an underscore
  • Moves the scripts that create the documentation page search window to HydeFront CDN
  • Updated autoloaded HydeFront version to 1.13.x

What's Changed

Full Changelog: v0.48.0-beta...v0.49.0-beta

v0.48.0-beta - 2022-07-10

10 Jul 10:42
421f9a8
Compare
Choose a tag to compare

About

This release brings a massive refactor in the way the HydePHP auto-discovery process works. It does this by centralizing all discovery logic to the new pseudo-router module which discovers and maps all source files and output paths.

The update also refactors related code to use the router. Part of this is a major rewrite of the navigation menu generation. If you have set any custom navigation links you will need to update your configuration files as the syntax has changed to use the NavItem model instead of array keys.

You will also need to update navigation related Blade templates, if you have previously published them.

Added

  • Added a pseudo-router module which will internally be used to improve Hyde auto-discovery
  • Added a Route facade that allows you to quickly get a route instance from a route key or path
  • Added a new NavItem model to represent navigation menu items
  • Added a new configuration array for customizing the navigation menu, see the hyde.navigation array config

Changed

  • Changed how the navigation menu is generated, configuration files and published views must be updated
  • Changed bootstrap.php to Stt Hyde base path using dirname instead of getcwd
  • Reversed deprecation for StaticPageBuilder::$outputPath
  • internal refactor: Creates a new build service to handle the build process

Deprecated

  • Deprecated DiscoveryService::findModelFromFilePath() - Use the Router instead.
  • Deprecated DiscoveryService.php - Use the Router instead. (Some helpers may be moved to FluentPathHelpers.php)

Removed

  • The "no pages found, skipping" message has been removed as the build loop no longer recieves empty collections.
  • Removed the hyde.navigation_menu_links and hyde.navigation_menu_blacklist configuration options, see new addition above.

What's Changed

Full Changelog: v0.47.0-beta...v0.48.0-beta

v0.47.0-beta - 2022-07-05

05 Jul 08:43
Compare
Choose a tag to compare

Added

  • Add macroable trait to Hyde facade

Full Changelog: v0.46.0-beta...v0.47.0-beta

v0.46.0-beta - 2022-07-03

03 Jul 19:46
Compare
Choose a tag to compare

Added

  • Added DocumentationPage::indexPath(), replacing Hyde::docsIndexPath()

Changed

  • internal: Move service provider helper methods to the RegistersFileLocations trait
  • internal: Add helpers.php to reduce repeated code and boilerplate
  • internal: Change internal monorepo scripts for semi-automating the release process
  • Added DocumentationPage as a class alias, allowing you to use it directly in Blade views, without having to add full namespace.

Removed

  • Remove deprecated Hyde::getDocumentationOutputDirectory(), replaced with DocumentationPage::getOutputDirectory()
  • Remove deprecated Hyde::docsIndexPath(), replaced with DocumentationPage::indexPath()
  • Remove deprecated DocumentationPage::getDocumentationOutputPath(), use DocumentationPage::getOutputPath() instead

Fixed

  • Fix minor bug in Blade view registry where merged array was not unique

What's Changed

Full Changelog: v0.45.0-beta...v0.46.0-beta

v0.45.0-beta - 2022-07-03

03 Jul 13:36
Compare
Choose a tag to compare

Added

  • Add dummy file to persist base Tailwind utilities #141
  • Add configuration feature for DataCollections to enable/disable automatic _data directory generation #142

Changed

  • DataCollections are now disabled by default
  • Rename internal trait RegistersDefaultDirectories to RegistersFileLocations

Removed

  • Removes the automatic check to see if the configuration file is up to date #143
  • Remove deprecated Hyde::titleFromSlug() helper, use Hyde::makeTitle() instead
  • Removed deprecated CollectionService::getBladePageList, is renamed to getBladePageFiles
  • Removed deprecated CollectionService::getMarkdownPageList, is renamed to getMarkdownPageFiles
  • Removed deprecated CollectionService::getMarkdownPostList, is renamed to getMarkdownPostFiles
  • Removed deprecated CollectionService::getDocumentationPageList, is renamed to getDocumentationPageFiles

Fixed

  • Fix bug causing files starting with underscores to add empty values to the file collection array #140

What's Changed

Full Changelog: v0.44.0-beta...v0.45.0-beta

v0.44.0-beta - 2022-07-02 - Internal code restructuring

02 Jul 18:34
Compare
Choose a tag to compare

About

This release mainly makes internal changes to the Framework API. If you are an end user, most of the changes are not relevant.
However, if you are a package developer, or if you have published Blade views or otherwise extended Hyde you may want to take a look as there are internal breaking changes.

Added

  • Added Hyde::makeTitle() helper, an improved version of Hyde::titleFromSlug()
  • Added new helper method render() to MarkdownDocuments to compile the Markdown to HTML, fixes #109
  • Added MarkdownPost as a class alias, allowing you to use it directly in Blade views, without having to add full namespace.

Changed

  • Update default HydeFront version to v1.12.x
  • Updates the codebase to use the new Hyde::makeTitle() helper
  • Several internal changes to how page models are structured, #122
  • Internal: Separate the MarkdownDocument into a dedicated abstract page class, #126
  • Moved Hyde\Framework\Models\BladePage to new namespace Hyde\Framework\Models\Pages\BladePage
  • Moved Hyde\Framework\Models\MarkdownPage to new namespace Hyde\Framework\Models\Pages\MarkdownPage
  • Moved Hyde\Framework\Models\MarkdownPost to new namespace Hyde\Framework\Models\Pages\MarkdownPost
  • Moved Hyde\Framework\Models\DocumentationPage to new namespace Hyde\Framework\Models\Pages\DocumentationPage
  • Improves how the site output directory is emptied, helping prevent accidental deletion of files #135
  • The emptying of the site output directory can now be disabled by setting the new config option hyde.empty_output_directory to false #136

Deprecated

  • Deprecated Hyde::titleFromSlug(), use Hyde::makeTitle() instead
  • Deprecate DocumentationPage::getDocumentationOutputPath()
  • Deprecate Hyde::docsIndexPath()
  • Deprecate Hyde::getDocumentationOutputDirectory()
  • Deprecate RegistersDefaultDirectories.php pending rename
  • Deprecated CollectionService::getBladePageList, is renamed to getBladePageFiles
  • Deprecated CollectionService::getMarkdownPageList, is renamed to getMarkdownPageFiles
  • Deprecated CollectionService::getMarkdownPostList, is renamed to getMarkdownPostFiles
  • Deprecated CollectionService::getDocumentationPageList, is renamed to getDocumentationPageFiles

Removed

  • Remove unused $withoutNavigation variable from the app layout
  • Removed deprecated 'hyde.site_output_path' config option (use hyde.output_directory instead)
  • Remove long deprecated hyde.version and framework.version service container bindings
  • Removed deprecated StarterFileService which was deprecated in v0.20.x

Fixed

  • Fix style bug #117, Hyde title helper should not capitalize non-principal words

What's Changed

Full Changelog: v0.43.0-beta...v0.44.0-beta

v0.43.0-beta - 2022-06-25 - File-based Collections

25 Jun 15:39
a388320
Compare
Choose a tag to compare

Added

  • Added configuration option hyde.media_extensions to allow you to specify additional comma separated media file types. #39
  • Adds a safer config option hyde.output_directory for customizing the output directory
  • Adds a file-based way to create and interact with collections, https://hydephp.com/docs/master/collections

Removed

  • Removed the --pretty build command option which was deprecated in v0.25.x
  • Removed deprecated internal AssetManager trait which was replaced with the Asset facade

Fixed

  • HydeRC: Fixes a bug in the auxiliary exception handler leading to unintentional recursion causing out of memory errors in both the browser and the PHP server.

What's Changed

  • Add configuration option to allow more file types in the media directory by @caendesilva in #105
  • Add a safer output directory config option to replace deprecated setting by @caendesilva in #106
  • Remove the --pretty build command option which was deprecated in v0.25.x by @caendesilva in #107
  • HydeRC: Fix bug causing out of memory failures in exception handler by @caendesilva in #108
  • Create static file collections by @caendesilva in #110
  • Remove deprecated internal AssetManager trait by @caendesilva in #111
  • v0.43.0-beta - 2022-06-25 - File-based Collections by @caendesilva in #113

Full Changelog: v0.42.0-beta...v0.43.0-beta

v0.42.0-beta - 2022-06-24

24 Jun 13:41
Compare
Choose a tag to compare

Added

  • Added a @section hook to the docs layout to allow yielding content
  • HydeRC: Add ping route to check if a HydeRC server is running hydephp/realtime-compiler#9
  • internal: Added an HtmlResponse object to the realtime compiler

Changed

  • Change the the Prettier integration to only modify HTML files #102
  • Change how the docs/search.html page is rendered, by handling page logic in the view, to decouple it from the build search command

Fixed

  • HydeRC: Rewrite request docs to docs/index to fix hydephp/realtime-compiler#10
  • Fix bug #93 where styles were missing on search.html when changing the output directory to root

What's Changed

Full Changelog: v0.41.0-beta...v0.42.0-beta

v0.41.0-beta - 2022-06-24 - Add an Asset facade

24 Jun 09:37
Compare
Choose a tag to compare

About

This release refactors and improves the Asset Service, adding auto-configuration features and a new Asset facade.

Using the Asset facade in Blade views

Instead of the long syntax Hyde::assetManager() you can now use the Asset facade directly. See this example, which both do the exact same thing using the same underlying service:

Hyde::assetManager()->hasMediaFile('app.css')
Asset::hasMediaFile('app.css')

If you don't know what any of this means, good news! You don't have to worry about it. Hyde's got your back.

Added

  • Added feature to dynamically load hyde.css and hyde.js if they exist locally
  • Added the Asset facade to be used instead of Hyde::assetManager()
  • Added the Asset facade as a class alias to config/app.css

Changed

  • Changed scripts.blade.php and styles.blade.php to use the Asset facade

Deprecated

  • Deprecated AssetManager.php (Hyde::assetManager()). Use the Asset facade instead

What's Changed

  • Add monorepo phpstorm .idea configuration by @caendesilva in #95
  • Fix bug #94: Hyde::docsIndexPath() checks the hard-coded source directory by @caendesilva in #96
  • Monorepo: Commit PHPUnit configuration for PhpStorm by @caendesilva in #97
  • HydeFront/Patch: Remove top padding on first documentation sidebar group, fix #92 by @caendesilva in #98
  • Improve AssetService and style/script handling by @caendesilva in #103

Full Changelog: v0.40.0-beta.3...v0.41.0-beta