Skip to content

Commit

Permalink
Merge pull request #1287 from hydephp/remove-test-links
Browse files Browse the repository at this point in the history
Remove test class references from main codebase
  • Loading branch information
caendesilva authored Mar 14, 2023
2 parents 251e042 + 287f54f commit 5b5ae46
Show file tree
Hide file tree
Showing 76 changed files with 7 additions and 154 deletions.
2 changes: 1 addition & 1 deletion RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ This serves two purposes:
- for soon-to-be removed features.

### Removed
- for now removed features.
- Removed test class references from main codebase https://github.com/hydephp/develop/pull/1287

### Fixed
- Fixed "ReadingTime calculation should never be under one minute" [#1286](https://github.com/hydephp/develop/issues/1286) in [#1285](https://github.com/hydephp/develop/pull/1285)
Expand Down
6 changes: 6 additions & 0 deletions monorepo/HydeStan/HydeStan.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,12 @@ private function analyseFile(string $file, string $contents): void
}
$this->errors[] = $error;
}

foreach (explode("\n", $contents) as $lineNumber => $line) {
if (str_starts_with($line, ' * @see') && str_ends_with($line, 'Test')) {
$this->errors[] = sprintf('Test class %s is referenced in %s:%s', trim(substr($line, 7)), realpath(__DIR__.'/../../packages/framework/'.$file) ?: $file, $lineNumber + 1);
}
}
}

$this->scannedLines += substr_count($contents, "\n");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

/**
* Hyde command to run the build process for the RSS feed.
*
* @see \Hyde\Framework\Testing\Feature\Commands\BuildRssFeedCommandTest
*/
class BuildRssFeedCommand extends Command
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

/**
* Hyde command to run the build process for the documentation search index.
*
* @see \Hyde\Framework\Testing\Feature\Commands\BuildSearchCommandTest
*/
class BuildSearchCommand extends Command
{
Expand Down
2 changes: 0 additions & 2 deletions packages/framework/src/Console/Commands/BuildSiteCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@

/**
* Hyde Command to run the Build Process.
*
* @see \Hyde\Framework\Testing\Feature\StaticSiteServiceTest
*/
class BuildSiteCommand extends Command
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

/**
* Hyde command to run the build process for the sitemap.
*
* @see \Hyde\Framework\Testing\Feature\Commands\BuildSitemapCommandTest
*/
class BuildSitemapCommand extends Command
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@
use function basename;
use function realpath;

/**
* @see \Hyde\Framework\Testing\Feature\Commands\ChangeSourceDirectoryCommandTest
*/
class ChangeSourceDirectoryCommand extends Command
{
/** @var string */
Expand Down
2 changes: 0 additions & 2 deletions packages/framework/src/Console/Commands/MakePageCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@

/**
* Hyde Command to scaffold a new Markdown or Blade page file.
*
* @see \Hyde\Framework\Testing\Feature\Commands\MakePageCommandTest
*/
class MakePageCommand extends Command
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
use Illuminate\Foundation\Console\PackageDiscoverCommand as BaseCommand;
use Illuminate\Foundation\PackageManifest;

/**
* @see \Hyde\Framework\Testing\Feature\Commands\PackageDiscoverCommandTest
*/
class PackageDiscoverCommand extends BaseCommand
{
/** @var true */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@

/**
* Publish the Hyde Config Files.
*
* @see \Hyde\Framework\Testing\Feature\Commands\UpdateConfigsCommandTest
*/
class PublishConfigsCommand extends Command
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@

/**
* Publish one of the default homepages.
*
* @see \Hyde\Framework\Testing\Feature\Commands\PublishHomepageCommandTest
*/
class PublishHomepageCommand extends Command
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@

/**
* Publish the Hyde Blade views.
*
* @see \Hyde\Framework\Testing\Feature\Commands\PublishViewsCommandTest
*/
class PublishViewsCommand extends Command
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@

/**
* Hyde Command to build a single static site file.
*
* @see \Hyde\Framework\Testing\Feature\Commands\RebuildPageCommandTest
*/
class RebuildPageCommand extends Command
{
Expand Down
2 changes: 0 additions & 2 deletions packages/framework/src/Console/Commands/RouteListCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@

/**
* Hyde command to display the list of site routes.
*
* @see \Hyde\Framework\Testing\Feature\Commands\RouteListCommandTest
*/
class RouteListCommand extends Command
{
Expand Down
3 changes: 0 additions & 3 deletions packages/framework/src/Console/Commands/ValidateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
use function microtime;
use function sprintf;

/**
* @see \Hyde\Framework\Testing\Feature\Commands\ValidateCommandTest
*/
class ValidateCommand extends Command
{
use TracksExecutionTime;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@

/**
* Publish any publishable assets from vendor packages.
*
* @see \Hyde\Framework\Testing\Feature\Commands\VendorPublishCommandTest
*/
class VendorPublishCommand extends BaseCommand
{
Expand Down
2 changes: 0 additions & 2 deletions packages/framework/src/Console/Concerns/Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
/**
* A base class for HydeCLI command that adds some extra functionality and output
* helpers to reduce repeated code and to provide a consistent user interface.
*
* @see \Hyde\Framework\Testing\Feature\CommandTest
*/
abstract class Command extends BaseCommand
{
Expand Down
1 change: 0 additions & 1 deletion packages/framework/src/Facades/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
*
* @see \Illuminate\Config\Repository
* @see \Illuminate\Support\Facades\Config
* @see \Hyde\Framework\Testing\Feature\TypedConfigFacadeTest
*/
class Config extends \Illuminate\Support\Facades\Config
{
Expand Down
3 changes: 0 additions & 3 deletions packages/framework/src/Facades/Features.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@
* @internal Until this class is split into a service/manager class, it should not be used outside of Hyde as the API is subject to change.
*
* @todo Split facade logic to service/manager class. (Initial and mock data could be set with boot/set methods)
*
* @see \Hyde\Framework\Testing\Feature\ConfigurableFeaturesTest
*
* Based entirely on Laravel Jetstream (License MIT)
* @see https://jetstream.laravel.com/
*/
Expand Down
1 change: 0 additions & 1 deletion packages/framework/src/Facades/Filesystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*
* @see \Hyde\Foundation\Kernel\Filesystem
* @see \Illuminate\Filesystem\Filesystem
* @see \Hyde\Framework\Testing\Feature\FilesystemFacadeTest
*/
class Filesystem
{
Expand Down
2 changes: 0 additions & 2 deletions packages/framework/src/Facades/Meta.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@

/**
* Helpers to fluently declare HTML meta elements using their object representations.
*
* @see \Hyde\Framework\Testing\Feature\MetadataHelperTest
*/
class Meta
{
Expand Down
2 changes: 0 additions & 2 deletions packages/framework/src/Facades/Site.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@

/**
* Facade to quickly get data for the HydePHP site and its configuration.
*
* @see \Hyde\Framework\Testing\Feature\SiteTest
*/
class Site
{
Expand Down
2 changes: 0 additions & 2 deletions packages/framework/src/Foundation/Concerns/HydeExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
* which you can access via the Hyde\Hyde facade, or via the service container.
*
* @example `$this->app->make(HydeKernel::class)->registerExtension(MyExtension::class);`
*
* @see \Hyde\Framework\Testing\Feature\HydeExtensionTest
*/
abstract class HydeExtension
{
Expand Down
3 changes: 0 additions & 3 deletions packages/framework/src/Foundation/HydeCoreExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@
use function array_filter;
use function array_keys;

/**
* @see \Hyde\Framework\Testing\Feature\HydeCoreExtensionTest
*/
class HydeCoreExtension extends HydeExtension
{
/** @return array<class-string<\Hyde\Pages\Concerns\HydePage>> */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@

/**
* @internal
*
* @see \Hyde\Framework\Testing\Feature\YamlConfigurationServiceTest
*/
class LoadYamlConfiguration
{
Expand Down
2 changes: 0 additions & 2 deletions packages/framework/src/Foundation/Kernel/Filesystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
*
* All paths arguments are relative to the root of the application,
* and will be automatically resolved to absolute paths.
*
* @see \Hyde\Framework\Testing\Feature\Foundation\FilesystemTest
*/
class Filesystem
{
Expand Down
2 changes: 0 additions & 2 deletions packages/framework/src/Foundation/Kernel/Hyperlinks.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
* Contains helpers and logic for resolving web paths for compiled files.
*
* It's bound to the HydeKernel instance, and is an integral part of the framework.
*
* @see \Hyde\Framework\Testing\Feature\Foundation\HyperlinksTest
*/
class Hyperlinks
{
Expand Down
2 changes: 0 additions & 2 deletions packages/framework/src/Foundation/PharSupport.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
* @experimental
*
* @internal
*
* @see \Hyde\Framework\Testing\Feature\PharSupportTest
*/
class PharSupport
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
*
* Accepts a string to make it easier to mock when testing.
*
* @see \Hyde\Framework\Testing\Feature\BladeMatterParserTest
*
* @phpstan-consistent-constructor
*
* === DOCUMENTATION (draft) ===
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@

/**
* Convert an array into YAML Front Matter.
*
* @see \Hyde\Framework\Testing\Feature\ConvertsArrayToFrontMatterTest
*/
class ConvertsArrayToFrontMatter
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@

/**
* Converts Markdown to plain text.
*
* @see \Hyde\Framework\Testing\Feature\Actions\ConvertsMarkdownToPlainTextTest
*/
class ConvertsMarkdownToPlainText
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@

/**
* Scaffold a new Markdown, Blade, or documentation page.
*
* @see \Hyde\Framework\Testing\Feature\Actions\CreatesNewPageSourceFileTest
*/
class CreatesNewPageSourceFile
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@

/**
* @internal Generate a JSON file that can be used as a search index for documentation pages.
*
* @see \Hyde\Framework\Testing\Feature\Services\DocumentationSearchServiceTest
*/
class GeneratesDocumentationSearchIndex
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@

/**
* Generates a table of contents for the Markdown document, most commonly used for the sidebar.
*
* @see \Hyde\Framework\Testing\Feature\Actions\GeneratesSidebarTableOfContentsTest
*/
class GeneratesTableOfContents
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
/**
* Prepares a Markdown file for further usage by extracting the Front Matter
* and Markdown body, and creating MarkdownDocument object from them.
*
* @see \Hyde\Framework\Testing\Feature\MarkdownFileParserTest
*/
class MarkdownFileParser
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
* may not want to commit the manifest file to their repository or their deployed site.
* However, a great alternate location is in `_site/build-manifest.json`,
* if you don't mind it the file being publicly accessible.
*
* @see \Hyde\Framework\Testing\Unit\GenerateBuildManifestTest
*/
class GenerateBuildManifest extends PostBuildTask
{
Expand Down
2 changes: 0 additions & 2 deletions packages/framework/src/Framework/Actions/SourceFileParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
* and may also conduct pre-processing and/or data validation/assembly.
*
* Note that the Page Parsers do not compile any HTML or Markdown.
*
* @see \Hyde\Framework\Testing\Feature\SourceFileParserTest
*/
class SourceFileParser
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@

/**
* Converts a Page Model into a static HTML page.
*
* @see \Hyde\Framework\Testing\Feature\StaticPageBuilderTest
*/
class StaticPageBuilder
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@

use function dirname;

/**
* @see \Hyde\Framework\Testing\Unit\InteractsWithDirectoriesConcernTest
*/
trait InteractsWithDirectories
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

/**
* Validate the existence of a Page class's source file.
*
* @see \Hyde\Framework\Testing\Unit\ValidatesExistenceTest
*/
trait ValidatesExistence
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@

/**
* The Post Author model object.
*
* @see \Hyde\Framework\Testing\Unit\PostAuthorTest
*/
class PostAuthor implements Stringable
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
use function str_replace;
use function sprintf;

/**
* @see \Hyde\Framework\Testing\Feature\Services\BuildTaskServiceTest
*/
abstract class BuildTask
{
use InteractsWithIO;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
* It is not based on a source file, but is dynamically generated when the Search feature is enabled.
* If you want to override this page, you can create a page with the route key "docs/search",
* then this class will not be applied. For example, `_pages/docs/search.blade.php`.
*
* @see \Hyde\Framework\Testing\Feature\DocumentationSearchPageTest
*/
class DocumentationSearchPage extends DocumentationPage
{
Expand Down
Loading

0 comments on commit 5b5ae46

Please sign in to comment.