Skip to content

Commit

Permalink
wtf PHPStorm
Browse files Browse the repository at this point in the history
  • Loading branch information
matcracker committed Jun 15, 2019
1 parent b156964 commit da67aa3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/matcracker/BedcoreProtect/Main.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
namespace matcracker\BedcoreProtect;

use matcracker\BedcoreProtect\commands\BCPCommand;
use matcracker\BedcoreProtect\listeners\PluginListener;
use matcracker\BedcoreProtect\listeners\TrackerListener;
use matcracker\BedcoreProtect\matcracker\BedcoreProtect\listeners\PluginListener;
use matcracker\BedcoreProtect\storage\Database;
use matcracker\BedcoreProtect\utils\ConfigParser;
use pocketmine\plugin\PluginBase;
Expand Down
2 changes: 1 addition & 1 deletion src/matcracker/BedcoreProtect/listeners/PluginListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

declare(strict_types=1);

namespace matcracker\BedcoreProtect\matcracker\BedcoreProtect\listeners;
namespace matcracker\BedcoreProtect\listeners;

use matcracker\BedcoreProtect\Inspector;
use matcracker\BedcoreProtect\Main;
Expand Down

3 comments on commit da67aa3

@SOF3
Copy link

@SOF3 SOF3 commented on da67aa3 Jun 17, 2019

Choose a reason for hiding this comment

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

Dear @matcracker,

I regret to inform you that your plugin "BedcoreProtect" (v0.2.3 submitted on 2019-06-15T15:15:27.000Z) has been rejected.

C1b — Stay in your namespace:

All classes, interfaces and traits declared by plugins must be under this unique namespace (or subnamespaces). This includes libraries bundled with the plugin. Consider using the virion framework, which provides a convenient way of shading libraries (i.e. refactoring libraries into your plugins namespace).

Please resolve these issues and submit the plugin again.

This comment is posted here because this is the last commit when the released build was created.

@matcracker
Copy link
Owner Author

Choose a reason for hiding this comment

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

@SOF3, I don't understand what's wrong with namespaces. They are all correct 😕

@SOF3
Copy link

@SOF3 SOF3 commented on da67aa3 Jun 17, 2019

Choose a reason for hiding this comment

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

If two plugins use the same composer library, and one uses version 1.2 and one uses version 1.3, it is undefined behaviour which one gets loaded. It is even possible that plugin-a/library-1.2/foo.php and plugin-b/library-1.3/bar.php get loaded together, which will lead to crash.
As a result, currently, the only way to prevent this problem is to shade the classes through technologies like virions.

I am looking to resolve this issue in PocketMine 4.1 or 5.0, but for now, this problem has no better solution.

Please sign in to comment.