Comments (10)
I ran now the test suite, the hypotesis I make is to have sabas/edifact & php-edifact/edifact-mapping installed via composer (so they both are required by a composer.json and are installed in the vendor folder).
Then cd into sabas/edifact and phpunit should return valid tests.
If you have a better layout feel free to suggest it :-)
from edifact.
If php-edifact/edifact-mapping is a dependency of sabas/edifact, it should be declared into require
key in composer.json
file. It can be done into require-dev
key too but I would use require
if you have to declare both packages in each project.
I ran composer require php-edifact/edifact-mapping
command after declaring "minimun-stability": "dev"
into composer.json
file and tests suite passed.
So test suite can be launched into sabas/edifact library and you would not have to declare it in project composer file. It would allow to run tests directly into library.
Have you ever thougt to use continuous integration for php-edifact/edifact-mapping and sabas/edifact with a service such Travis? To use such thing, it is necessary, that you declare all dependencies into composer.json
file.
from edifact.
It's required for the tests, this package contains only the classes, the mapping contains xml data, but they aren't really required (some of my applications use only Encoder for instance).
Till some months ago the mapping was in a subtree of the repo, then I spun it out in a different package, so this one would be smaller...
from edifact.
I understand. So we can declare it into require-dev
section ?
from edifact.
Ok, I re-read the composer section about require-dev and I understood how it works (I had a doubt about root packages).
I updated the composer.json of this repository π
from edifact.
Nice π
from edifact.
Hi back,
For the warning I reported into issue description, I would like to understand why you need to include composer autoload file into Bootstrap.php
Β file.
As I launch vendor/bin/phpunit
command into library, I do not need the file.
If it is required for your environment, we can check if the file exists, can we?
from edifact.
IIRC was added by @Xiro to deal with the xml mapping loading.
Now that we load the xmls as in
edifact/tests/EDITest/InterpreterTest.php
Line 23 in 229fe1e
from edifact.
If I understood well, you usually install sabas/edifact and php-edifact/edifact-mapping as dependency of a projet. So you have vendor/sabas/edifact
and vendar/php-edifact/edifact-mapping
folder installed. And you run phpunit
inside vendor/sabas/edifact
folder. Is that right? In that case, you indead have to include Composer autoload file from your project.
As I just wanted to run tests suite on the library before I begin my project, I just did:
- clone sabas/edifact lib inside
/path/to/sabas/edifact
- run composer install inside
/path/to/sabas/edifact
folder - run
vendor/bin/phpunit
command
In that case, phpunit
bash script require already /path/to/sabas/edifact/vendor/autoload.php
, so induding it into Bootstrap.php
is not necessary.
I do not want to change the way you are working with sabas/edifact but usually, a git repository should be testable without including it into a concrete project.
from edifact.
The tests were contributed, I don't really check them frequently (I guess my software engineering class taught me anything)... When adding new features I usually make a dummy project like you described, I guess I should write tests more often!
Having the bootstrap code breaks anything or it's only a matter of having the repository clean? If the latter I would leave it, at least for compatibility reasons (I could adapt, but I would speak for myself)
Do you plan to integrate tests in your own project and load automatically the existing?
from edifact.
Related Issues (20)
- Release 0.5.0 not available via Composer HOT 2
- Possibility to have IDs instead of name as output from Interpreter::prepare HOT 5
- CDR read HOT 4
- Problems reading RFF segment from EDI-File HOT 1
- Array to string conversion, if an epty array met. HOT 1
- X12 HOT 6
- Package ramsey/array_column is abandoned HOT 2
- Trouble understanding how to get the data we need HOT 5
- Segment is ambiguous HOT 1
- Elements with maxrepeat > 1 should be considered arrays when parsed as json HOT 6
- Reader doesn't return full multi-line texts HOT 4
- Multiple SG2 segments not allowed HOT 8
- Does IFTMIN:S:93A supported? HOT 5
- UTF8 characters handling in input edi file HOT 15
- How to create edi document with .edi extension for healthcare HOT 4
- readEdiSegmentDTM for SG12 HOT 5
- File has multiple messages HOT 6
- question marks are not parsed correctly HOT 5
- Fatal error on integer-value segments for Encoder HOT 2
- Reader cannot be init with a null param HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from edifact.