composer.json added & fix undefined variable.