Giter Site home page Giter Site logo

addresses's People

Contributors

abdullahiabdulkabir avatar aocneanu avatar codacy-badger avatar gandesc avatar gitmanuela avatar grahamcampbell avatar ionutcatalinsandu avatar raftx24 avatar stylecibot avatar vmcvlad avatar y0net avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

addresses's Issues

The archive may contain identical file names with different capitalization - database\cities\GBR/CON.json): Failed to open stream: Invalid argument

This is a bug(windows).

Prerequisites

  • Are you running the latest version?
  • Are you reporting to the correct repository?
  • Did you check the documentation?
  • Did you perform a cursory search?

Description

Has any of you got this error on composer update:

 - Installing laravel-enso/addresses (4.6.17): Extracting archive
    Install of laravel-enso/addresses failed
  - Installing symfony/var-exporter (v5.3.7): Extracting archive
  - Installing symfony/cache-contracts (v2.4.0): Extracting archive
  - Installing symfony/cache (v5.3.7): Extracting archive
  - Installing squizlabs/php_codesniffer (3.6.0): Extracting archive
  - Installing slevomat/coding-standard (7.0.15): Extracting archive
  - Installing symfony/stopwatch (v5.3.4): Extracting archive
  - Installing symfony/filesystem (v5.3.4): Extracting archive
  - Installing seld/phar-utils (1.1.2): Extracting archive
  - Installing seld/jsonlint (1.8.3): Extracting archive
    0 [>---------------------------]

  [RuntimeException]
  The archive may contain identical file names with different capitalization (which fails on case insensitive filesystems): ZipArchive::extractTo(c:\myproject/vendor/composer/267b1069/laravel-enso-addresses-86d7466\
  database\cities\GBR/CON.json): Failed to open stream: Invalid argument



  [ErrorException]
  ZipArchive::extractTo(c:\myproject/vendor/composer/267b1069/laravel-enso-addresses-86d7466\database\cities\GBR/CON.json): Failed to open stream: Invalid argument

This happens on windows.

I've tried composer clearcache. Not working.

Error on install

This is a bug.

Prerequisites

  • Are you running the latest version?
  • Are you reporting to the correct repository?
  • Did you check the documentation?
  • Did you perform a cursory search?

Description

1 Doctrine\DBAL\Driver\PDOException::("SQLSTATE[21S01]: Insert value list does not match column list: 1136 Column count doesn't match value count at row 74")
/vagrant/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:82

2 PDOException::("SQLSTATE[21S01]: Insert value list does not match column list: 1136 Column count doesn't match value count at row 74")
/vagrant/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:80

Steps to Reproduce

Expected behavior

Actual behavior

addresses import

mass import for application setup

Ideas:

  • maybe have an address type selector (people, companies)
  • template must have a common type model identifier column

Nullable fields causing getLabelAttribute to throw

This is a bug | feature request.

Prerequisites

  • Are you running the latest version?
  • Are you reporting to the correct repository?
  • Did you check the documentation?
  • Did you perform a cursory search?

Description

My address table allows for nullable fields and as such the getLabelAttribute causes an exception Trying to get property 'name' of non-object.

Would it be possible to change getLabelAttribute to below? Or do you suggest I approach this differently?

Suggested

public function getLabelAttribute()
    {
        $label = collect([
                trim($this->number ?? ''.' '.$this->street ?? ''),
                $this->city ?? '',
                $this->country->name ?? '',
            ])->filter()
            ->implode(', ');
..........

Original

public function getLabelAttribute()
    {
        $label = collect([
                trim($this->number.' '.$this->street),
                $this->city,
                $this->country->name,
            ])->filter()
            ->implode(', ');
.........

Steps to Reproduce

Make city, country_id nullable.

Update not working

I merged in master branch of Enso today and updated with composer update.
AddressesManager package was not downloaded (it should be linked from Enso core).
Do I have to add it somewhere to composer.json?

Use a pre filled countries table

I use the following package to handle the countries table:
webpatser/laravel-countries

It provides a Seeder for a pre filled countries table (with a lot of additional information to each country).
Maybe it's interesting for you to change to this package?
Otherwise I have to find a solution to migrate your countries table to mine or vice versa.

Query relating to seeding random addresses using factory

This is a ** query **

Prerequisites

  • [Y ] Are you running the latest version?
  • [Y ] Are you reporting to the correct repository?
  • [Y ] Did you check the documentation?
  • [Y] Did you perform a cursory search?

Description

I am trying to seed random addresses to then assign to work orders. The trait requires me to use

`<?php use App\User;

$factory->define(LaravelEnso\AddressesManager\app\Models\Address::class, function (Faker\Generator $faker) {

$user = User::find(1);
Auth::login($user);

return [
'addressable_type' => "App\WorkOrder",
'addressable_id' => $faker->randomElement(\App\WorkOrder::pluck('id')->toArray()),
'street' => $faker->name,
'street_type' => 'Street',
'number' => $faker->biasedNumberBetween($min = 0, $max = 140, $function = 'sqrt'),
'postal_area' => $faker->postcode,
'city' => $faker->city,
'country_id' => 235,
'created_by' => 1,
];
});
otherwise I get:ErrorException : Trying to get property 'id' of non-object

at /vagrant/vendor/laravel-enso/trackwho/src/app/Traits/CreatedBy.php:10
6| {
7| protected static function bootCreatedBy()
8| {
9| self::creating(function ($model) {

10| $model->created_by = auth()->user()->id;
11| });
12| }
13|
14| public function createdBy()

Exception trace:

1 Raven_Breadcrumbs_ErrorHandler::handleError("Trying to get property 'id' of non-object", "/vagrant/vendor/laravel-enso/trackwho/src/app/Traits/CreatedBy.php", [Object(LaravelEnso\AddressesManager\app\Models\Address)])
/vagrant/vendor/laravel-enso/trackwho/src/app/Traits/CreatedBy.php:10

2 LaravelEnso\AddressesManager\app\Models\Address::LaravelEnso\TrackWho\app\Traits{closure}(Object(LaravelEnso\AddressesManager\app\Models\Address))
/vagrant/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php:360

`

Steps to Reproduce

Expected behavior

Expected to happen as requires created by, but there must be a better way than me creating a user object? Can I bypass a trait? Is there a way to default created by to id 1?

Actual behavior

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.