You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .scrutinizer.yml
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,8 @@ build:
6
6
version: '7.1'
7
7
node:
8
8
version: '8.10.0'
9
+
hosts:
10
+
localhost: 127.0.0.1
9
11
nodes:
10
12
# angular:
11
13
# project_setup:
@@ -27,6 +29,8 @@ build:
27
29
root_path: './'
28
30
tests:
29
31
override:
32
+
- npm run sf-dev &
33
+
- npm run test-cafe
30
34
- npm run test-karma
31
35
- php-scrutinizer-run
32
36
-
@@ -39,6 +43,8 @@ build:
39
43
coverage:
40
44
file: 'var/report/clover.xml'
41
45
format: 'clover'
46
+
#it fails look at this build where localhost doesn't seem to respond https://scrutinizer-ci.com/g/Rebolon/php-sf-flex-webpack-encore-vuejs/inspections/b75b10a6-6e41-4936-a453-da3632eda436
# see http://devexpress.github.io/testcafe/documentation/recipes/integrating-testcafe-with-ci-systems/travis.html
53
55
- "export DISPLAY=:99.0"
54
56
- "sh -e /etc/init.d/xvfb start"
@@ -58,6 +60,7 @@ before_script:
58
60
script:
59
61
# until this issue is open i disable npm test and use test-php and test-karma in place (issue:https://github.com/DevExpress/testcafe/issues/2195, original post: https://testcafe-discuss.devexpress.com/t/role-sometime-it-doesnt-seem-to-be-played/875/9)
Copy file name to clipboardExpand all lines: README.md
+14-1Lines changed: 14 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,6 +46,7 @@ Then some php controllers has been created on following routes :
46
46
* /demo/http-plug : HttpPlugController to show how to call external API from your controller
47
47
* /demo/login/standard/secured : LoginController for standard login by Symfony
48
48
* /demo/login/json/authenticate : LoginJsonController for json login with JS applications but in stateful context
49
+
* /demo/login/jwt/frontend: LoginJwtController for jwt login with JS applications in a stateless context
49
50
* /demo/vuejs : VuejsController with route config in annotations and VueJS app with specific js/css import
50
51
* /demo/quasar : QuasarController like VuejsController but with the Quasar framework for UX components
51
52
* /demo/form/quasar-vuejs : [Work in progress] authentification with javascript, and a full web application with vuejs and api-platform(rest/graphql)
@@ -232,6 +233,12 @@ On JS i use snyk services.
232
233
@TODO explain the usage of tools like OWASP ZED, sqlmap, php avenger...
233
234
@TODO help to setup security system: stateful app = take care at csrf ; stateless app = should i use jwt, api key, OAuth, anything else ?
234
235
236
+
Don't forget to use HTTPS, even in local to help you find errors that will happen in production. One certificate has been generated for localhost (with http://www.selfsignedcertificate.com/) and is available in /var/certificates/*.cert|*.key
237
+
There is a simple nginx conf (used for travis CI) that use those certificates so you can use nginx to work (just don't forget to change the port that is fixed to 80 like setup in the package.json).
238
+
239
+
TestCafé for functional testing generate an error when you don't use ssl: Uncaught (in promise) DOMException: Only secure origins are allowed (see: https://goo.gl/Y0ZkNV).
240
+
But for instance i didn't found any solution to run it finely without --skip-js-errors parameters.
241
+
235
242
### Symfony security
236
243
In Symfony i configured different firewalls:
237
244
**security_js* and *security_php* share the same context so when you are logged on one, you are also logged on the other. I did this because a firewall cannot use both form_login and json_login (or i didn't found the way), and i wnated you to understand the concept of context.
@@ -479,11 +486,12 @@ It takes the following JSON string as Body:
479
486
-[ ] api: graphQL: multiple mutations in one call ?
480
487
-[ ] api: graphQL: how to mutate nested objects in a minimal call ?
481
488
-[X] api: check best security system to setup with ApiPlatform (JWT / ApiKey / cookie & csrf system but in that case we are stateful which is not cool for deployment and replication ?). Finally we use JWT which is the best thing to do and compliant with statefull or stateless.
482
-
-[ ] api: JWT setup the pattern for the refresh-token or anything else more info here https://auth0.com/blog/refresh-tokens-what-are-they-and-when-to-use-them/
489
+
-[ ] api: JWT setup the pattern for the refresh-token or anything else more info here https://auth0.com/blog/refresh-tokens-what-are-they-and-when-to-use-them/ : when getting a 401 from api it should tells more information: does the token is valid or not ?
483
490
-[x] front: setup VueJS
484
491
-[x] front: use Quasar with VueJS
485
492
-[x] front: move on Quasar 0.15.x
486
493
-[x] front: setup CSRF protection with VueJS app
494
+
-[ ] front: migrate app 'form-devextrem-angular' to angular6 when there will be compatible (this thread may helps: https://stackoverflow.com/questions/48970553/want-to-upgrade-project-from-angular-v5-to-angular-v6)
487
495
-[x] quality: setup unit tests for JS (karma/jasmine)
488
496
-[x] quality: setup e2e tests for JS (testcafé)
489
497
-[x] quality: setup phpunit tests for PHP (unit test and webtestcase)
@@ -506,6 +514,8 @@ It takes the following JSON string as Body:
506
514
-[x] security: check if i need the JMSSerializerBundle or if the serializer component is enough (if autowiring runs well, why not): **I prefer to use Symfony serializer, it's enough**
507
515
-[ ] db: have a lookAt the HauteLookAliceBundle to help in the creation of real fixtures during tests (instead of generating a new test.db which could be long)
508
516
-[ ] api: try https://github.com/overblog/GraphQLBundle instead of ApiPlatform to try nested query/mutations (resolver are not auto-generated)
517
+
-[ ] quality: use a server logger for both JS and PHP (and also maybe HTTP, DB, MessageQueuing, ...), it will helps to improve quality of the app by identifing users system/browser and most current errors (Sentry or other service must be tested https://www.slant.co/options/964/alternatives/~sentry-alternatives)
518
+
-[ ] front: move on babel 7 with babel-preset-env (remove all related babel from readme and read babeljs.io for more info on update)
509
519
510
520
* improve this tutorial with ~~an API Route built with Api platform (without DB)~~ and install the vue-generator from api-platform for a crud sample
511
521
* manage Entity orphanRemoval / CASCADE onDelete
@@ -564,7 +574,10 @@ I wrote some articles on medium to explain some practices setup in this project:
Copy file name to clipboardExpand all lines: assets/js/form-devxpress-angular/src/app/datagrid/datagrid.component.ts
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -47,14 +47,14 @@ export class DatagridComponent implements OnInit {
47
47
48
48
// Take care, until you click on the parent window, data won't be refreshed in datagrid. don't know if it's because of browser behavior or DevXpress.datagrid
49
49
notify(`new Book received with id ${book.id}, focus the window to see the changes in datagrid.
50
-
Data is not saved until you edit it`,"info",5000)
50
+
Data is not saved until you edit it`,"info",5000)
51
51
this.dataGrid.instance.clearSelection()
52
52
53
53
break
54
54
case'hello':
55
55
case'ping':
56
56
default:
57
-
notify("data received from second screen","info",5000)
57
+
notify(`data received from second screen (cmd=${message.cmd})`,"info",5000)
58
58
break
59
59
}
60
60
})
@@ -151,7 +151,7 @@ export class DatagridComponent implements OnInit {
0 commit comments