-
Notifications
You must be signed in to change notification settings - Fork 265
PHPLIB-1208: Split example namespaces #1139
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
Merged
alcaeus
merged 1 commit into
mongodb:v1.16
from
alcaeus:phplib-1208-make-examples-executable
Jul 24, 2023
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -90,23 +90,23 @@ public function dataExamples(): Generator | |
]; | ||
|
||
$expectedOutput = <<<'OUTPUT' | ||
MongoDB\Examples\PersistableEntry Object | ||
MongoDB\Examples\Persistable\PersistableEntry Object | ||
( | ||
[id:MongoDB\Examples\PersistableEntry:private] => MongoDB\BSON\ObjectId Object | ||
[id:MongoDB\Examples\Persistable\PersistableEntry:private] => MongoDB\BSON\ObjectId Object | ||
( | ||
[oid] => %s | ||
) | ||
|
||
[name] => alcaeus | ||
[emails] => Array | ||
( | ||
[0] => MongoDB\Examples\PersistableEmail Object | ||
[0] => MongoDB\Examples\Persistable\PersistableEmail Object | ||
( | ||
[type] => work | ||
[address] => [email protected] | ||
) | ||
|
||
[1] => MongoDB\Examples\PersistableEmail Object | ||
[1] => MongoDB\Examples\Persistable\PersistableEmail Object | ||
( | ||
[type] => private | ||
[address] => [email protected] | ||
|
@@ -123,26 +123,26 @@ public function dataExamples(): Generator | |
]; | ||
|
||
$expectedOutput = <<<'OUTPUT' | ||
MongoDB\Examples\TypeMapEntry Object | ||
MongoDB\Examples\Typemap\TypeMapEntry Object | ||
( | ||
[id:MongoDB\Examples\TypeMapEntry:private] => MongoDB\BSON\ObjectId Object | ||
[id:MongoDB\Examples\Typemap\TypeMapEntry:private] => MongoDB\BSON\ObjectId Object | ||
( | ||
[oid] => %s | ||
) | ||
|
||
[name:MongoDB\Examples\TypeMapEntry:private] => alcaeus | ||
[emails:MongoDB\Examples\TypeMapEntry:private] => Array | ||
[name:MongoDB\Examples\Typemap\TypeMapEntry:private] => alcaeus | ||
[emails:MongoDB\Examples\Typemap\TypeMapEntry:private] => Array | ||
( | ||
[0] => MongoDB\Examples\TypeMapEmail Object | ||
[0] => MongoDB\Examples\Typemap\TypeMapEmail Object | ||
( | ||
[type:MongoDB\Examples\TypeMapEmail:private] => work | ||
[address:MongoDB\Examples\TypeMapEmail:private] => [email protected] | ||
[type:MongoDB\Examples\Typemap\TypeMapEmail:private] => work | ||
[address:MongoDB\Examples\Typemap\TypeMapEmail:private] => [email protected] | ||
) | ||
|
||
[1] => MongoDB\Examples\TypeMapEmail Object | ||
[1] => MongoDB\Examples\Typemap\TypeMapEmail Object | ||
( | ||
[type:MongoDB\Examples\TypeMapEmail:private] => private | ||
[address:MongoDB\Examples\TypeMapEmail:private] => [email protected] | ||
[type:MongoDB\Examples\Typemap\TypeMapEmail:private] => private | ||
[address:MongoDB\Examples\Typemap\TypeMapEmail:private] => [email protected] | ||
) | ||
|
||
) | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we going to have the same problem with the CSFLE examples? Or perhaps not because those don't define any functions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Potentially, yes. In this particular case we won't, however I consider this an upstream issue, as blindly compiling every PHP file regardless of whether it's even available to be autoloader is an error. The PR @GromNaN created in the library excludes all files in
examples
folders from compilation, which fixes the issue for good. This is just a temporary workaround to resolve the immediate issue until it can be fixed upstream.