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

refactor(command): installation structure directory #94

Merged
merged 6 commits into from
Oct 10, 2023
Merged

Conversation

holiq
Copy link
Member

@holiq holiq commented Oct 6, 2023

No description provided.

@holiq holiq self-assigned this Oct 6, 2023
@what-the-diff
Copy link

what-the-diff bot commented Oct 6, 2023

PR Summary

  • Updated composer.json Dependency Versions
    Variations in our dependencies setup have been amended in our root file to facilitate smoother interoperability between packages within our application's environment.

  • **Changed Application Name Keyword **
    The configuration for our application structure has been adjusted to reflect Application instead of the previous app to increase comprehensibility.

  • Adjusted Data Type Assignments Across Files
    Several files have been updated to reflect more appropriate data type assignments. This impacts how specific properties and methods handle data input or output, enhancing the correctness in the system's functioning.

  • Improved Autoload Handling
    An enhancement has been made in the file that handles our packages auto loading. It now accepts a string parameter to add a new domain-based entry to the autoload array, allowing more cohesive inclusion of related resources.

  • Added New Variable in ReplacePlaceholderAction.php File
    A new variable has been added in this file to optimise its core functionality.

  • Updated Return-Type Across Files
    In an effort to maintain code uniformity, methods in several files have been updated to return ?string instead of string|null. This change ensures less confusion and more consistency across all methods in our code base.

  • Changed Signature of an Install Command
    A change was made to the command string associated with the installation process, adding new logic to handle a domain argument. This allows a more flexible installation process in different domains.

  • Extended an Interface
    Implemented a more robust structure for our Console interface, which now extends the Arguments interface.

  • Updated Data Types in DTOs
    Refining our data integrity by updating the data types in several Data Transfer Objects (DTOs), we aim for a more uniform data transportation system across our application.

  • Adjusted Methods in Sources.php File
    Several methods in the Source.php file now explicitly include return statements, enhancing the readability and understanding of these methods' operations.

  • Modified Test Cases
    Adjusted our automated test cases to use the updated install command, ensuring the correctness of our testing environment after these changes.

  • Updated Data Types in Fixture Files
    Fixture files have been revised to more accurately represent the types of data our system may encounter. This ensures more accurately emulated testing circumstances.

In summary, these changes contribute to improving the code consistency, enhancing flexibility, and ensuring accurate data handling across our system.

@holiq
Copy link
Member Author

holiq commented Oct 7, 2023

#95

@holiq holiq requested a review from kevariable October 9, 2023 11:14
protected $signature = 'diamond:install {--skip-refactor}';
use HasArguments;

protected $signature = 'domain:install {domain} {--skip-refactor}';
Copy link
Member

Choose a reason for hiding this comment

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

remove --skip-refactor since we disabled it

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh yeah, I forgot this

Comment on lines +82 to +109
// protected function resolveRefactor(): void
// {
// if (! $this->option('skip-refactor')) {
// $filesystem = new Filesystem;
// $filesystem->ensureDirectoryExists($this->resolveInfrastructurePath());
// $filesystem->moveDirectory(from: app_path(path: 'Providers'), to: $this->resolveInfrastructurePath());
// $configPath = base_path(path: '/config/app.php');
// /** @var string $contents */
// $contents = Str::replace(
// search: 'App\\Providers',
// replace: $this->resolveNamespace(),
// subject: $filesystem->get($configPath)
// );
//
// $filesystem->put(path: $configPath, contents: $contents);
//
// foreach ($filesystem->files($this->resolveInfrastructurePath()) as $file) {
// /** @var string $contents */
// $contents = Str::replace(
// search: 'App\\Providers',
// replace: $this->resolveNamespace(),
// subject: $filesystem->get($file)
// );
//
// $filesystem->put(path: $file, contents: $contents);
// }
// }
// }
Copy link
Member

Choose a reason for hiding this comment

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

Please put an commen why we commented it

Copy link
Member Author

Choose a reason for hiding this comment

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

Okay

@holiq holiq merged commit ca581b2 into KoalaFacade:3x Oct 10, 2023
1 check passed
@pemudakoding pemudakoding added hacktoberfest-accepted Hacktoberfest label enhancement New feature or request labels Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request hacktoberfest-accepted Hacktoberfest label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants